aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/wallet/query.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/wallet/query.ts b/lib/wallet/query.ts
index d5ec1fecc..b4f9c511b 100644
--- a/lib/wallet/query.ts
+++ b/lib/wallet/query.ts
@@ -357,6 +357,10 @@ class QueryRoot {
return this.kickoffPromise;
}
this.kickoffPromise = new Promise((resolve, reject) => {
+ if (this.work.length == 0) {
+ resolve();
+ return;
+ }
const mode = this.hasWrite ? "readwrite" : "readonly";
const tx = this.db.transaction(Array.from(this.stores), mode);
tx.oncomplete = () => {