diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-04 18:18:50 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-04 18:18:50 -0700 |
commit | 00715943006156039fddf08a25af42e9e35daa58 (patch) | |
tree | 4032cf59361eb7bcea4c7e426eac5da584ce68e2 /theme/javascript/utils/storage.js | |
parent | 460799828f55dd7b144232bea2687f36bd3021cd (diff) | |
download | gitbook-00715943006156039fddf08a25af42e9e35daa58.zip gitbook-00715943006156039fddf08a25af42e9e35daa58.tar.gz gitbook-00715943006156039fddf08a25af42e9e35daa58.tar.bz2 |
Fix error with mixpanel loading
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;; |