diff options
author | bobzel <zzzman@gmail.com> | 2021-02-26 15:59:47 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-26 15:59:47 -0500 |
commit | 90ddde65b0ab407b5711bfa75fcf3d90cf74689d (patch) | |
tree | 44b4d0d0c93e1893330588989a9f4142e65c635a /src/server/database.ts | |
parent | daa1e3ddf585f5fe237c100504130a3eae204252 (diff) |
starting to work on removing _ from fields
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)); } } |