Closed returnlytom closed 7 years ago
Hi @returnlytom , That's weird because before accessing localStorage I check if it exists using this line of code:
if (typeof localStorage === 'undefined' || typeof console === 'undefined') {
return;
}
Can you send me the crash report?
Two examples, with the OS / browser info:
null is not an object (evaluating 'localStorage["mobx-angular-debug"]')
Cannot read property 'mobx-angular-debug' of null
Thanks. So localStorage is null. I will add that check as well in 1.8.0 - should solve it.
Deployed - can you verify?
Thanks for the fix; will push to production and keep you posted.
Appears to be working, but now crashing here:
Seems to be limited to this OS / browser profile:
Pushed to 1.8.1 - can you check? By the way - does it work in development? What are you doing differently in production build?
Will do.
Not doing anything different in development; but we don't test on all browsers
MobxAngularDebug is very helpful during the development process. But per Can I Use, approximately ~5% of users are running browsers that do not support Web Storage. Subsequently, every so often I receive a notification via Sentry that my production app crashed during an instantiation of an observable (which was ultimately triggered by the lack of localStorage support).
Thus, it would be great if there was a build time flag we could use to disable including this utility with the production bundle.