diff options
Diffstat (limited to 'src/server')
-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 8e0f99a1f..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 && value) { + 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 if (value) { + } else if (value !== null) { this.onConnect.push(() => this.insert(value, collectionName)); } } |