redux-persist icon indicating copy to clipboard operation
redux-persist copied to clipboard

Transformer Errors Not Being Logged

Open julian-george opened this issue 3 years ago • 0 comments

I had an error in one of my transformers that was resulting in my state not being persisted, but that error wasn't being thrown/logged, leading to a lot of confusion. So I had to dig into this package's source code a little bit, and the error was thrown and logged upon calling getStoredState, but not when rehydrating. This can be easily fixed by adding a console.error(err) at line 146 of src/persistReducer.ts for development mode, and it'd save dumb devs like me a bunch of time.

julian-george avatar Jun 29 '22 04:06 julian-george