-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Open
Description
Describe the bug
SettingsContextresets settings to defaults on every page reload because it initializes state with defaults and only reads from localStorage in auseEffect, which causes settings to be overwritten.dataURItoBlobinutils.jslacks error handling for malformed data URIs, which can cause the app to crash.
To Reproduce
- Change settings (e.g., turn off grid).
- Reload page.
- Settings are back to default (grid is on).
Expected behavior
Settings should persist across reloads.
Proposed Fix
- Initialize
SettingsContextstate lazily fromlocalStorageto ensure settings are loaded before first render. - Add error handling to
dataURItoBlobto handle invalid inputs gracefully.
I have a PR ready with these fixes.
Metadata
Metadata
Assignees
Labels
No labels