diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-02-11 20:38:09 -0500 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-02-11 20:38:09 -0500 |
commit | 2eb147ab8f25e6dd90f47cf21499c7340642f0c9 (patch) | |
tree | 527f184d12ee4ab1e50efc715c992b7fced0d406 /src/client/SocketStub.ts | |
parent | 7d30ae6c423290e502f72be566c4aba4fe62f9ff (diff) |
asdkjfl
Diffstat (limited to 'src/client/SocketStub.ts')
-rw-r--r-- | src/client/SocketStub.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/SocketStub.ts b/src/client/SocketStub.ts index 3b1401632..bdf326cd8 100644 --- a/src/client/SocketStub.ts +++ b/src/client/SocketStub.ts @@ -19,7 +19,7 @@ export class SocketStub { // server stores stripped down document (w/ only field id proxies) in the field store this.FieldStore.set(document.Id, new Document(document.Id)); - document.fields.forEach((f, key) => (this.FieldStore.get(document.Id) as Document)._proxies.set(key, (f as Field).Id)); + document.fields.forEach((f, key) => (this.FieldStore.get(document.Id) as Document)._proxies.set(key.Id, (f as Field).Id)); // Server.Socket.emit(MessageStore.AddDocument.Message, document) } @@ -41,7 +41,7 @@ export class SocketStub { // server updates its document to hold a proxy mapping from key => fieldId var document = this.FieldStore.get(doc.Id) as Document; if (document) - document._proxies.set(key, value.Id); + document._proxies.set(key.Id, value.Id); // server adds the field to its repository of fields this.FieldStore.set(value.Id, value); @@ -55,7 +55,7 @@ export class SocketStub { // Server removes the field id from the document's list of field proxies var document = this.FieldStore.get(doc.Id) as Document; if (document) - document._proxies.delete(key); + document._proxies.delete(key.Id); } public static SEND_SET_FIELD(field: Field, value: any) { |