mirror of
https://github.com/less/less.js.git
synced 2026-01-23 06:07:56 -05:00
At least catch no browser storage rather than balking
This commit is contained in:
@@ -217,8 +217,13 @@ function createCSS(styles, sheet, lastModified) {
|
||||
// Don't update the local store if the file wasn't modified
|
||||
if (lastModified && cache) {
|
||||
log('saving ' + href + ' to cache.');
|
||||
cache.setItem(href, styles);
|
||||
cache.setItem(href + ':timestamp', lastModified);
|
||||
try {
|
||||
cache.setItem(href, styles);
|
||||
cache.setItem(href + ':timestamp', lastModified);
|
||||
} catch(e) {
|
||||
//TODO - could do with adding more robust error handling
|
||||
log('failed to save');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user