Skip to content

Commit

Permalink
Merge pull request #12 from jklein24/master
Browse files Browse the repository at this point in the history
Some fixes for the compiler
  • Loading branch information
atotic committed Jun 9, 2015
2 parents a3debc3 + 0d1d6bb commit efd5153
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions iron-localstorage.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
/**
* The data associated with this storage.
* If value is set to null, and storage is in useRaw mode, item will be deleted
* @type {*}
*/
value: {
type: Object,
Expand Down Expand Up @@ -149,10 +150,10 @@

/**
* loads value from local storage
* @param {Boolean} externalChange true if loading changes from a different window
* @param {boolean=} externalChange true if loading changes from a different window
*/
_load: function(externalChange) {
var v = localStorage.getItem(this.name);
var v = window.localStorage.getItem(this.name);

if (v === null) {
this.fire('iron-localstorage-load-empty');
Expand All @@ -179,9 +180,9 @@
var v = this.useRaw ? this.value : JSON.stringify(this.value);
try {
if (this.value === null) {
localStorage.removeItem(this.name);
window.localStorage.removeItem(this.name);
} else {
localStorage.setItem(this.name, v);
window.localStorage.setItem(this.name, /** @type {string} */ (v));
}
}
catch(ex) {
Expand Down

0 comments on commit efd5153

Please sign in to comment.