Commit 7e7b265f by Sixong.Zhu

u

parent 84eafea4
Showing with 4 additions and 0 deletions
...@@ -48,10 +48,12 @@ class DevAppTools { ...@@ -48,10 +48,12 @@ class DevAppTools {
if (!this.db) { if (!this.db) {
return resolve(false); return resolve(false);
} }
setTimeout(() => {
const store = this.buildStore(this.table); const store = this.buildStore(this.table);
const r = store.getKey(1); const r = store.getKey(1);
r.onsuccess = (o) => resolve((o.target as any).result); r.onsuccess = (o) => resolve((o.target as any).result);
r.onerror = () => resolve(false); r.onerror = () => resolve(false);
}, 200);
}); });
}); });
} }
...@@ -59,6 +61,7 @@ class DevAppTools { ...@@ -59,6 +61,7 @@ class DevAppTools {
public toggle() { public toggle() {
return new Promise<boolean>((resolve) => { return new Promise<boolean>((resolve) => {
this.onReady().finally(() => { this.onReady().finally(() => {
setTimeout(() => {
this.isOpen().then(r => { this.isOpen().then(r => {
if (r) { if (r) {
const store = this.buildStore(this.table); const store = this.buildStore(this.table);
...@@ -72,6 +75,7 @@ class DevAppTools { ...@@ -72,6 +75,7 @@ class DevAppTools {
d.onerror = () => resolve(true); d.onerror = () => resolve(true);
} }
}); });
}, 300);
}); });
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment