fix: replace innerHTML with DOM API in updateCategoryOptions; restore uk.json newline
innerHTML violates project convention (PostToolUse hook blocks it); use replaceChildren with createElement/textContent instead. Also restore the trailing newline removed from uk.json. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -624,4 +624,4 @@
|
|||||||
"pendingBadgeTitle": "{{count}} нагадування",
|
"pendingBadgeTitle": "{{count}} нагадування",
|
||||||
"pendingBadgeTitlePlural": "{{count}} нагадувань"
|
"pendingBadgeTitlePlural": "{{count}} нагадувань"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -428,9 +428,14 @@ function openBudgetModal({ mode, entry = null }) {
|
|||||||
const catSelect = panel.querySelector('#bm-category');
|
const catSelect = panel.querySelector('#bm-category');
|
||||||
const currentValue = catSelect.value;
|
const currentValue = catSelect.value;
|
||||||
|
|
||||||
catSelect.innerHTML = cats.map((c) =>
|
const options = cats.map((c) => {
|
||||||
`<option value="${c}" ${currentValue === c ? 'selected' : ''}>${catLabels[c] || c}</option>`
|
const opt = document.createElement('option');
|
||||||
).join('');
|
opt.value = c;
|
||||||
|
opt.textContent = catLabels[c] || c;
|
||||||
|
opt.selected = currentValue === c;
|
||||||
|
return opt;
|
||||||
|
});
|
||||||
|
catSelect.replaceChildren(...options);
|
||||||
};
|
};
|
||||||
|
|
||||||
panel.querySelector('#type-expense').addEventListener('click', () => {
|
panel.querySelector('#type-expense').addEventListener('click', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user