Skip to content

Commit

Permalink
Grid: Fix store to handle empty localStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed Sep 28, 2011
1 parent f0d8e17 commit c739542
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions grid-editing/localstore.js
Expand Up @@ -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();
}
}
},
Expand Down

0 comments on commit c739542

Please sign in to comment.