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:
Thomas Camlong committed 2026-06-15 17:24:18 +02:00
1 parent 15ed1e51fd
commit df66cf25c7
6 files changed
+47 -31

No files matched your search

+2 -1
View File
@@ -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");
},
});