robinvdvleuten / vuex-persistedstate

💾 Persist and rehydrate your Vuex state between page reloads.
https://npm.im/vuex-persistedstate
MIT License
5.77k stars 379 forks source link

Return specifc error on initialization #252

Closed gangsthub closed 4 years ago

gangsthub commented 4 years ago

👀 Reopened #239 with cleaned git commits history (I fucked up with an unnecessary rebase).

We could be facing a DOMException like QuotaExceededError. The library was returning Invalid storage instance given which wasn't correct

What:

This will report exact error, instead of a generic one.

Why:

I was getting Invalid storage instance given when really it was a quota limit exceeded in Firefox.

How:

Checklist:

robinvdvleuten commented 4 years ago

@gangsthub looking good! Thanks for your effort!