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:
Ulas Kalayci
2026-04-19 13:07:32 +02:00
parent 7910636ffa
commit 52b494241e
2 changed files with 9 additions and 4 deletions
+8 -3
View File
@@ -428,9 +428,14 @@ function openBudgetModal({ mode, entry = null }) {
const catSelect = panel.querySelector('#bm-category');
const currentValue = catSelect.value;
catSelect.innerHTML = cats.map((c) =>
`<option value="${c}" ${currentValue === c ? 'selected' : ''}>${catLabels[c] || c}</option>`
).join('');
const options = cats.map((c) => {
const opt = document.createElement('option');
opt.value = c;
opt.textContent = catLabels[c] || c;
opt.selected = currentValue === c;
return opt;
});
catSelect.replaceChildren(...options);
};
panel.querySelector('#type-expense').addEventListener('click', () => {