aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/storage.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/storage.js')
-rw-r--r--src/js/storage.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/js/storage.js b/src/js/storage.js
index f876f107..5f663ab5 100644
--- a/src/js/storage.js
+++ b/src/js/storage.js
@@ -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);