Skip to content

Commit

Permalink
fix(CacheItem): pass saved value to utilities to fix value for combin…
Browse files Browse the repository at this point in the history
…ed decorators
  • Loading branch information
DanielKucal committed Dec 25, 2017
1 parent a7261be commit b3b6093
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-store",
"version": "1.3.1",
"version": "1.3.2",
"main": "./dist/index",
"typings": "./dist/index",
"description": "Angular decorators to automagically keep variables in HTML5 LocalStorage, SessionStorage, cookies; injectable services for managing and listening to data changes and a bit more.",
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/cache-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class CacheItem implements CacheItemInterface {
let savedValue = (readValue !== null) ? readValue : value;
let proxy = this.getProxy(savedValue, config) || value;
debug.log('initial value for ' + this.key + ' in ' + this.currentTarget.constructor.name, proxy);
this.utilities.forEach(utility => utility.set(this._key, value, config));
this.utilities.forEach(utility => utility.set(this._key, savedValue, config));
return proxy;
}
this.utilities.forEach(utility => utility.set(this._key, value, config));
Expand Down

0 comments on commit b3b6093

Please sign in to comment.