Empty storage fix

This commit is contained in:
Sam Potts
2018-01-07 23:16:55 +11:00
parent ebb3b83b27
commit dd190155c4
5 changed files with 10 additions and 5 deletions

View File

@ -53,7 +53,12 @@ class Storage {
}
// Get current storage
const storage = this.get();
let storage = this.get();
// Default to empty object
if (utils.is.empty(storage)) {
storage = {};
}
// Update the working copy of the values
utils.extend(storage, object);