bug: window.localStorage in Firefox

Firefox 3.6.4 throws an error when trying to access `window.localStorage`.
(at least from `chrome://` URLs in extensions if not more)
This commit is contained in:
Kristoffer Walker
2010-06-28 04:22:55 +08:00
committed by Alexis Sellier
parent 1a8188bd20
commit eff69f5b77

View File

@@ -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 <link> tags with the 'rel' attribute set to "stylesheet/less"