Browse files

Grid: Fix store to handle empty localStorage

  • Loading branch information...
1 parent f0d8e17 commit c739542e9827d567fb0803bf9d51113b99465e12 @jzaefferer jzaefferer committed Sep 28, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 grid-editing/localstore.js
View
6 grid-editing/localstore.js
@@ -31,11 +31,13 @@ $.widget( "demos.localstore", {
url: this.options.initial,
async: false,
success: function( result ) {
- that.save( result );
+ that.data = result;
+ that.save();
}
});
} else {
- this.save( this.options.initial );
+ this.data = this.options.initial;
+ this.save();
}
}
},

0 comments on commit c739542

Please sign in to comment.