refactor(beszel): remove ternary operators and fix dead code
Replace all ternary operators with if/else, &&/||, or early returns. Remove unused noAnimation constant that caused lint error. Fix variable shadowing in tooltip deduplication loop.
This commit is contained in:
6 files changed
+47
-31
No files matched your search
@@ -122,6 +122,7 @@ export const beszelStatsRequestHandler = createCachedIntegrationRequestHandler<
|
||||
queryKey: "beszelStats",
|
||||
cacheDurationForInput(input) {
|
||||
const config = timePeriodConfig[input.timePeriod];
|
||||
return config ? dayjs.duration(config.cacheSeconds, "seconds") : undefined;
|
||||
if (!config) return undefined;
|
||||
return dayjs.duration(config.cacheSeconds, "seconds");
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user