InitDB: add missing objectStores
InitDB now automatically adds the missing objectstore instead of rejecting
This commit is contained in:
parent
1954fc0782
commit
38f43d805d
@ -8401,8 +8401,12 @@ Bitcoin.Util = {
|
||||
.stringify(Object.keys(
|
||||
objectStores).sort()))
|
||||
resolve("Initiated IndexedDB");
|
||||
else
|
||||
reject("IndexedDB already exist with different ObjectStores!");
|
||||
else {
|
||||
Object.values(db.objectStoreNames).forEach(obs => delete objectStores[obs])
|
||||
this.initDB(dbName, objectStores, db.version + 1)
|
||||
.then(result => resolve(result))
|
||||
.catch(error => reject(error))
|
||||
}
|
||||
db.close();
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user