diff options
author | bobzel <zzzman@gmail.com> | 2021-02-26 16:50:45 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-26 16:50:45 -0500 |
commit | e4615d12bfe74523b00185cf616a226cf94e303c (patch) | |
tree | 12e7b115b2cec836867da5314f9b662b80b44fac /src/server/database.ts | |
parent | daa1e3ddf585f5fe237c100504130a3eae204252 (diff) |
reverting back some parts of the fix to serialization
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 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)); } } |