Commit fe8b0a19 by Иван Кубота

fix empty load

parent 7b1945f7
......@@ -487,11 +487,11 @@ Store.SaveInterface.LocalStorage = function(key, store) {
};
Store.SaveInterface.LocalStorage.prototype = {
load: function(cb) {
var data = {};
var data;
try{
data = JSON.parse( localStorage.getItem( this.key ) );
}catch(e){}
cb && cb(false, data);
cb && cb(false, data || {});
return data;
},
// Should support full save if arguments.length === 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment