Stop showing the word "null" above the menu (Fixes #26)

render() passed null to root.append(), which prints it as text. Only append
the reset banner when there is one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-24 14:20:18 -05:00
parent 1cdebcef85
commit 14a46abc63
2 changed files with 2 additions and 2 deletions

View File

@@ -1034,7 +1034,7 @@
btn('Change passphrase', changePassphrase),
btn('Print…', openPrintDialog),
btn(state.editing ? 'Done editing' : 'Edit', () => { state.editing = !state.editing; render(); }, state.editing ? 'primary' : ''))),
resetRequested() && !state.resetOffered ? resetBanner() : null,
...(resetRequested() && !state.resetOffered ? [resetBanner()] : []), // never pass null: append() would print "null"
h('div', { class: 'layout' }, renderNav(),
h('main', {}, onHeader ? [h('h2', {}, 'Print header'), headerPanel()]
: sec ? [h('h2', {}, sec.title), state.editing ? editSection(sec) : viewSection(sec)]