Commit 7e7b265f by Sixong.Zhu

u

parent 84eafea4
Showing with 4 additions and 0 deletions
......@@ -48,10 +48,12 @@ class DevAppTools {
if (!this.db) {
return resolve(false);
}
setTimeout(() => {
const store = this.buildStore(this.table);
const r = store.getKey(1);
r.onsuccess = (o) => resolve((o.target as any).result);
r.onerror = () => resolve(false);
}, 200);
});
});
}
......@@ -59,6 +61,7 @@ class DevAppTools {
public toggle() {
return new Promise<boolean>((resolve) => {
this.onReady().finally(() => {
setTimeout(() => {
this.isOpen().then(r => {
if (r) {
const store = this.buildStore(this.table);
......@@ -72,6 +75,7 @@ class DevAppTools {
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