db repaired

This commit is contained in:
silas 2018-11-05 16:20:23 +01:00
parent e5b3cd8e1f
commit e66e525fd8
2 changed files with 13 additions and 12 deletions

File diff suppressed because one or more lines are too long

View File

@ -31,10 +31,11 @@ export class WordRotatorDb extends MyDb {
console.log("update", oldVersion, newVersion);
if (Helper.isNull(oldVersion) || oldVersion < 6 && newVersion >= 6) {
if (!e.target.transaction.objectStore(WordRotatorDb.OBJECT_STORE.SYSTEM_VARS)){
try {
db.deleteObjectStore(WordRotatorDb.OBJECT_STORE.SYSTEM_VARS);
} catch (e) {}
let levelObjectStore = db.createObjectStore(WordRotatorDb.OBJECT_STORE.SYSTEM_VARS, {"keyPath": "name"});
}
}
};
async saveManyLevels(levels) {