Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on iOS Incognito #14

Open
reitzensteinm opened this issue Oct 8, 2016 · 0 comments
Open

Exception on iOS Incognito #14

reitzensteinm opened this issue Oct 8, 2016 · 0 comments

Comments

@reitzensteinm
Copy link

When running on iOS (tested across multiple devices), storage-atom crashes when initializing an atom. Something as simple as this line will crash:

(local-storage (atom {}) :db)

With the exception:

QuotaExceededError: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.

Related Stack Overflow question:

http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an

I fixed it by simply wrapping my call in an exception handler like this:

(try (local-storage (atom {}) :db) (catch js/Error e (atom {})))))

I'm happy to do the legwork for a patch that fixes this if that would be helpful, probably by adding a similar try/catch to the StorageBackend deftype items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@reitzensteinm and others