At least catch no browser storage rather than balking

This commit is contained in:
Luke Page
2012-09-01 17:12:32 +01:00
parent 5f99bd22e9
commit f6917c8fa6

View File

@@ -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');
}
}
}