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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user