fix(robustness): parseInt radix, minGapDays null-guard, log silent catches (#14)

- parseInt(month/year) now passes radix 10 consistently.
- minGap eligibility guards null/undefined (c.minGapDays != null && > 0).
- The corrupt-localStorage load and the createEmployee catch now console.warn
  instead of swallowing the error silently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ferdi2goandClaude Opus 4.8 committed 2026-06-03 13:05:34 +00:00
1 parent fd9870871b
commit 7ab2911c2f
4 files changed
+8 -6

No files matched your search

+3 -2
View File
@@ -26,8 +26,9 @@ try {
state.settings = { moderatorsPerDay: parsed.settings.moderatorsPerDay };
}
}
} catch {
// Corrupt storage — start fresh
} catch (e) {
// Corrupt storage — start fresh, but leave a breadcrumb for debugging
console.warn('Gespeicherter Zustand konnte nicht gelesen werden, starte leer:', e);
}
// Persist immediately. Used by the debounced saveState and the flush handlers.