Closed kesdeband closed 5 years ago
Published a fix at 3.0.1
Still occurring at 3.0.2 after just installing.
If no configuration is provided (as it says it is optional) at function LocalStorageService(config)
config takes null value and if (config === void 0)
evaluates to false therefore config object is never initialized and line 65 var notifyOptions = config.notifyOptions, prefix = config.prefix, storageType = config.storageType;
throws the error.
I have found a workaround by providing an empty config object:
LocalStorageModule.forRoot({ })
Just to confirm is this that LocalStorageModule.forRoot(null)
throws the error? Or LocalStorageModule.forRoot()
?
LocalStorageModule.forRoot()
works.
LocalStorageModule.forRoot({})
works.
LocalStorageModule.forRoot(null)
throws it.
Leaving this line out of imports
entirely: throws it.
Hope this helps! Thanks!
This error occurred after installing the latest version of angular-2-local-storage. Possibly a bug?