Skip to content

Commit c739542

Browse files
committed
Grid: Fix store to handle empty localStorage
1 parent f0d8e17 commit c739542

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

grid-editing/localstore.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ $.widget( "demos.localstore", {
3131
url: this.options.initial,
3232
async: false,
3333
success: function( result ) {
34-
that.save( result );
34+
that.data = result;
35+
that.save();
3536
}
3637
});
3738
} else {
38-
this.save( this.options.initial );
39+
this.data = this.options.initial;
40+
this.save();
3941
}
4042
}
4143
},

0 commit comments

Comments
 (0)