Use window.localStorage in all cases

pull/1/head
Alex Beregszaszi 9 years ago
parent 79a30f6c78
commit d0db134a34
  1. 6
      src/app/storage-handler.js

@ -1,4 +1,4 @@
/* global chrome, confirm, localStorage */
/* global chrome, confirm */
var utils = require('./utils');
@ -17,11 +17,11 @@ function StorageHandler (updateFiles) {
console.log('comparing to cloud', key, resp);
if (typeof resp[key] !== 'undefined' && obj[key] !== resp[key] && confirm('Overwrite "' + utils.fileNameFromKey(key) + '"? Click Ok to overwrite local file with file from cloud. Cancel will push your local file to the cloud.')) {
console.log('Overwriting', key);
localStorage.setItem(key, resp[key]);
window.localStorage.setItem(key, resp[key]);
updateFiles();
} else {
console.log('add to obj', obj, key);
obj[key] = localStorage[key];
obj[key] = window.localStorage[key];
}
done++;
if (done >= count) {

Loading…
Cancel
Save