localStorageSyncAndClean errors
See original GitHub issueWhen I use localStorageSync it works fine:
localStorageSync(['auth'], true)
But if I use localStorageSyncAndClean I get errors:
localStorageSyncAndClean(['auth'], true, true)
The error I get is:
Unhandled Promise rejection: Cannot read property 'currentSlot' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read property 'currentSlot' of undefined
at MapSubscriber.project (task.effects.ts:39)
at MapSubscriber._next (map.js:77)
at MapSubscriber.Subscriber.next (Subscriber.js:89)
at State.BehaviorSubject._subscribe (BehaviorSubject.js:28)
at State.Observable._trySubscribe (Observable.js:57)
at State.Subject._trySubscribe (Subject.js:97)
Basically this is referring to when I do this:
@Effect()
goToSlotAfterChange$ = this.store
.select(state => state.tasks.currentSlot)
.map(slot => {
return slot ?
go(['/' + slot]) :
go(['/'])
});
So, it is saying tasks
is null. It seems like it says this because the store was not initialized. So, the problem here is that when I use localStorageSyncAndClean, the store doesn’t appear to be initialized. I am not sure why that is, but I can look further into this later.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Dealing with localStorage errors - CHRISBERKHOUT.COM
Although localStorage quota errors are known by names such as QuotaExceededError and QUOTA_EXCEEDED_ERR , the only way to write testable, non- ...
Read more >Handling localStorage errors (such as quota exceeded errors)
Let's say you want to check if localStorage is full before inserting an item: how would you do it? Well, there's only one...
Read more >Error when saving value to localStorage - Stack Overflow
I'm trying to save and read but when I try to save the value of button in the panel, I get error -...
Read more >Troubleshooting Harness - Harness.io Docs
Typically, the solution is to clear local storage. Troubleshooting steps. Log out of Harness Manager from all Chrome tabs.
Read more >Always catch LocalStorage security and quota exceeded errors
Why you should always catch LocalStorage errors, and a cross-browser solution to catch the quota exceeded error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
no problem. I have a workaround for now to just use
localStorageSync(['auth'], true, window.localStorage, true)
Closing 👍