The word "null" shows above the left-hand menu #26

Closed
opened 2026-11-24 19:19:38 +00:00 by eric · 1 comment
Owner

Bug

The word "null" appears as plain text between the toolbar and the left-hand menu on every page.

Cause

render() in src/app.js passes resetRequested() && !state.resetOffered ? resetBanner() : null as an argument to root.append(...). Our h() helper skips null children, but the DOM's append converts null to the string "null". Introduced with the ?reset=1 banner (60501b9, #19), so it shows whenever no reset is requested.

Fix

Only append the banner when there is one (no null argument). Check in a real browser that the text is gone and that the ?reset=1 banner still appears.

Note: a saved file runs the app code it was saved with, so an existing file only loses the "null" after its data is opened in a newer build and saved (see Upgrading in the README).

## Bug The word "null" appears as plain text between the toolbar and the left-hand menu on every page. ## Cause `render()` in `src/app.js` passes `resetRequested() && !state.resetOffered ? resetBanner() : null` as an argument to `root.append(...)`. Our `h()` helper skips null children, but the DOM's `append` converts `null` to the string "null". Introduced with the `?reset=1` banner (60501b9, #19), so it shows whenever no reset is requested. ## Fix Only append the banner when there is one (no null argument). Check in a real browser that the text is gone and that the `?reset=1` banner still appears. Note: a saved file runs the app code it was saved with, so an existing file only loses the "null" after its data is opened in a newer build and saved (see Upgrading in the README).
eric closed this issue 2026-11-24 19:22:07 +00:00
Author
Owner

Fixed in 14a46ab (Ver 261124G): the reset banner is only appended when present, so no null is passed to append(). Verified in headless Chromium that the old code left a stray "null" text node and the new code does not, and that the ?reset=1 banner still shows. Existing files lose the text after their data is opened in a newer build and saved.

Fixed in 14a46ab (Ver 261124G): the reset banner is only appended when present, so no null is passed to append(). Verified in headless Chromium that the old code left a stray "null" text node and the new code does not, and that the ?reset=1 banner still shows. Existing files lose the text after their data is opened in a newer build and saved.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: eric/final-wishes#26
No description provided.