mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-21 08:45:12 -05:00
IndexedDB error
This commit is contained in:
parent
ef91e2b2a7
commit
2c6af7111b
@ -50,7 +50,10 @@ module.exports = {
|
||||
app.desktop = new Desktop();
|
||||
app.cache = new AppCache();
|
||||
app.storage = new Storage();
|
||||
app.storage.open(function() {
|
||||
app.storage.open(function(success) {
|
||||
if (!success) {
|
||||
console.error('IndexedDB is not activated (private mode?)');
|
||||
}
|
||||
cb();
|
||||
});
|
||||
},
|
||||
|
@ -30,7 +30,7 @@ Storage.prototype = {
|
||||
var request = indexedDB.open('datastorage', this.version);
|
||||
request.onsuccess = function (e) {
|
||||
self.db = e.target.result;
|
||||
cb(false, self.db);
|
||||
cb(true);
|
||||
};
|
||||
request.onupgradeneeded = function (e) {
|
||||
var db = e.target.result;
|
||||
@ -40,7 +40,9 @@ Storage.prototype = {
|
||||
self.archive.setup(db);
|
||||
self.profiles.setup(db);
|
||||
};
|
||||
request.onerror = cb;
|
||||
request.onerror = function(e) {
|
||||
cb(false);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user