diff --git a/www/common/LessLoader.js b/www/common/LessLoader.js index a4c01c0bf..86adca3ba 100644 --- a/www/common/LessLoader.js +++ b/www/common/LessLoader.js @@ -9,18 +9,20 @@ define([ var module = { exports: {} }; var key = Config.requireConf.urlArgs; var localStorage = {}; - try { - localStorage = window.localStorage || {}; - if (localStorage['LESS_CACHE'] !== key) { - Object.keys(localStorage).forEach(function (k) { - if (k.indexOf('LESS_CACHE|') !== 0) { return; } - delete localStorage[k]; - }); - localStorage['LESS_CACHE'] = key; + if (!window.cryptpadCache) { + try { + localStorage = window.localStorage || {}; + if (localStorage['LESS_CACHE'] !== key) { + Object.keys(localStorage).forEach(function (k) { + if (k.indexOf('LESS_CACHE|') !== 0) { return; } + delete localStorage[k]; + }); + localStorage['LESS_CACHE'] = key; + } + } catch (e) { + console.error(e); + localStorage = {}; } - } catch (e) { - console.error(e); - localStorage = {}; } var cacheGet = function (k, cb) {