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:
1 parent
fd9870871b
commit
7ab2911c2f
4 files changed
+8
-6
No files matched your search
+2
-2
@@ -99,13 +99,13 @@ export function renderCalendar() {
|
||||
renderGrid(wrapper, exportBtn);
|
||||
|
||||
monthSel.addEventListener('change', () => {
|
||||
currentMonth = parseInt(monthSel.value);
|
||||
currentMonth = parseInt(monthSel.value, 10);
|
||||
loadPlanFromHistory();
|
||||
renderGrid(wrapper, exportBtn);
|
||||
});
|
||||
|
||||
yearSel.addEventListener('change', () => {
|
||||
currentYear = parseInt(yearSel.value);
|
||||
currentYear = parseInt(yearSel.value, 10);
|
||||
loadPlanFromHistory();
|
||||
renderGrid(wrapper, exportBtn);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user