diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-02 23:35:15 -0500 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-02 23:35:15 -0500 |
commit | 067377e138254c72ad4cf3609b05d5aab2b71a26 (patch) | |
tree | 9ce9b22e585a0e1472eb3216630c2404e8517144 /src/server/database.ts | |
parent | 95451a2eb0871856b946fff8a14ca0c385af5f1b (diff) | |
parent | 1b481cd441cc8bb200906b246b43e4bc5dc53b4e (diff) |
agh stop merging
Diffstat (limited to 'src/server/database.ts')
-rw-r--r-- | src/server/database.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/database.ts b/src/server/database.ts index 41bf8b3da..2a55c14de 100644 --- a/src/server/database.ts +++ b/src/server/database.ts @@ -163,7 +163,7 @@ export namespace Database { } public async insert(value: any, collectionName = DocumentsCollection) { - if (this.db) { + if (this.db && value !== null) { if ("id" in value) { value._id = value.id; delete value.id; @@ -185,7 +185,7 @@ export namespace Database { newProm = prom ? prom.then(run) : run(); this.currentWrites[id] = newProm; return newProm; - } else { + } else if (value !== null) { this.onConnect.push(() => this.insert(value, collectionName)); } } |