Skip to content

fix: clear uppercase browser storage when disabling debug - #1069

Open
longint2 wants to merge 1 commit into
debug-js:masterfrom
longint2:fix/disable-uppercase-browser-storage
Open

longint2 wants to merge 1 commit into
debug-js:masterfrom
longint2:fix/disable-uppercase-browser-storage

Conversation

@longint2

@longint2 longint2 commented Dec 6, 2026

Copy link
Copy Markdown

Calling disable() in a browser does not persist when logging was enabled through localStorage.DEBUG: the lowercase key is removed, but load() picks up the uppercase fallback again on reload.

Clear both supported storage keys when disabling. Add browser tests for lowercase, uppercase, and an older uppercase setting overridden by enable(). Also remove an existing extra space in the adjacent load() statement so XO passes.

Validation: the new browser suite fails twice before the fix. Afterward, npm test with Node 20 passes all 16 Node tests, all 17 Headless Chrome tests, and XO (16 existing warnings). Node 24 runs the tests but the old lint dependency crashes on the removed util.isDate API.

AI-assisted contribution; reproduction, implementation, and tests were performed using Codex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant