diff options
Diffstat (limited to 'theme/javascript/utils/storage.js')
-rw-r--r-- | theme/javascript/utils/storage.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/theme/javascript/utils/storage.js b/theme/javascript/utils/storage.js index 14275c6..57f5878 100644 --- a/theme/javascript/utils/storage.js +++ b/theme/javascript/utils/storage.js @@ -14,6 +14,7 @@ define(function(){ }, get: function(key, def) { key = baseKey+":"+key; + if (localStorage[key] === undefined) return def; try { var v = JSON.parse(localStorage[key]); return v == null ? def : v;; |