FIX: if localStorage is disabled, still boot

This commit is contained in:
Sam 2015-08-11 12:40:51 +10:00
parent aa81261875
commit f6c6f6e7a1
1 changed files with 5 additions and 1 deletions

View File

@ -10,9 +10,13 @@
var safeLocalStorage; var safeLocalStorage;
try { try {
safeLocalStorage = localStorage; safeLocalStorage = localStorage;
if (localStorage["disableLocalStorage"] === "true") {
safeLocalStorage = null;
}
} catch(e){ } catch(e){
// cookies disabled, we don't care // cookies disabled, we don't care
safeLocalStorage = null;
} }
Discourse.KeyValueStore = { Discourse.KeyValueStore = {