diff options
author | bobzel <zzzman@gmail.com> | 2021-02-26 15:12:28 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-26 15:12:28 -0500 |
commit | daa1e3ddf585f5fe237c100504130a3eae204252 (patch) | |
tree | a74b132d3f6b8e62db67a30aca4e336925f50cca /src/server/database.ts | |
parent | fce6c26e2f62ffc21702a2edc64e0ee00828825e (diff) |
fixed serialization error handling to not kill Dash - bad list items prevented tabs from being created. cleaned up document fields a little more - switched layers to _layerTags, got rid of a couple unused 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 41bf8b3da..8e0f99a1f 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) { 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) { this.onConnect.push(() => this.insert(value, collectionName)); } } |