rothsandro / eleventy-notes

A template for Eleventy to publish your personal notes or docs.
https://eleventy-notes.sandroroth.com/
138 stars 16 forks source link

App crashes when theme has invalid value #27

Closed rothsandro closed 1 year ago

rothsandro commented 1 year ago

If there is a theme item in localStorage with an invalid value like "light" (e.g. when the user did run another project on localhost before that used the same key), the whole app crashes. On smaller screen sizes it's even worse, the mobile menu does not disappear and the user will never see any content.

Parsing errors should be catched and the stored ignored.

rothsandro commented 1 year ago

Fixed in v0.12.1