mirror of
https://github.com/less/less.js.git
synced 2026-01-22 13:48:03 -05:00
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:
committed by
Alexis Sellier
parent
1a8188bd20
commit
eff69f5b77
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user