aboutsummaryrefslogtreecommitdiff
path: root/src/server/index.ts
diff options
context:
space:
mode:
authorlaurawilsonri <laura_wilson@brown.edu>2019-03-11 19:50:09 -0400
committerlaurawilsonri <laura_wilson@brown.edu>2019-03-11 19:50:09 -0400
commit9ea59e265b02a0206be49ee1a970bb0e69381f87 (patch)
treec4525daf8cc7ecfff209c24367042a727e7a745e /src/server/index.ts
parent46de24b2e5c2cbaf12d0f8e6d0974979c3cfbcd7 (diff)
parent7f13e25550761bd174b26a64ed73374c2d5da964 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into fixContextMenu
Diffstat (limited to 'src/server/index.ts')
-rw-r--r--src/server/index.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/index.ts b/src/server/index.ts
index 0d0b65b22..83fa84746 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -173,8 +173,9 @@ function getFields([ids, callback]: [string[], (result: any) => void]) {
}
function setField(socket: Socket, newValue: Transferable) {
- Database.Instance.update(newValue._id, newValue)
- socket.broadcast.emit(MessageStore.SetField.Message, newValue)
+ Database.Instance.update(newValue._id, newValue, () => {
+ socket.broadcast.emit(MessageStore.SetField.Message, newValue);
+ })
}
server.listen(serverPort);