Warn if writing to storage too early

// FREEBIE
This commit is contained in:
lilia 2016-02-26 13:11:00 -08:00
parent f05b40e89a
commit a98de39173

View file

@ -25,6 +25,9 @@
if (value === undefined) {
throw new Error("Tried to store undefined");
}
if (!ready) {
console.log('Called storage.put before storage is ready');
}
var item = items.add({id: key, value: value}, {merge: true});
item.save();
},