rt2zz / redux-persist-transform-immutable

immutable support for redux-persist
112 stars 42 forks source link

Issue with config #9

Closed jeroenbourgois closed 8 years ago

jeroenbourgois commented 8 years ago

The check for config is not enough, this gives an error:

if(config.records because when config is undefined it will try to read records. I propose

if(config && config.records) ?

If you want I will make a PR

jeroenbourgois commented 8 years ago

For now I can bypass it by sending a nullified config with the function: {records: null}

jdmunro commented 8 years ago

I also have the same issue. Thanks for the workaround!

antoinerey commented 8 years ago

You can just give an empty configuration object too.

persistStore(store, {
  transforms: [ immutableTransform({}) ],
})