diff --git a/lib/less/browser.js b/lib/less/browser.js index 579d1e15..8eff0915 100644 --- a/lib/less/browser.js +++ b/lib/less/browser.js @@ -49,7 +49,12 @@ if (less.env === 'development') { less.optimization = 3; } -var cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage; +var cache; +try { + cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage; +} catch (e) { + cache = null; +} // // Get all tags with the 'rel' attribute set to "stylesheet/less"