Skip to content

Commit

Permalink
fix(WebStorageUtility): fix iterating over local/sessionStorage to av…
Browse files Browse the repository at this point in the history
…oid weird change events, v1.3.5
  • Loading branch information
DanielKucal committed Jan 11, 2018
1 parent 152f2b1 commit a408c7f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 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.4",
"version": "1.3.5",
"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
4 changes: 2 additions & 2 deletions src/utility/webstorage-utility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ export class WebStorageUtility {
if (typeof this._storage.forEach === 'function') {
return this._storage.forEach((value, key) => callbackFn(this.getGettable(value), key));
}
for (let key in this._storage) {
Object.keys(this._storage).forEach((key) => {
callbackFn(this.getGettable(this._storage[key]), key);
}
});
}

public getSettable(value: any): string {
Expand Down

0 comments on commit a408c7f

Please sign in to comment.