aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/Server.ts4
-rw-r--r--src/client/SocketStub.ts6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/client/Server.ts b/src/client/Server.ts
index db6bf992c..30fc57c93 100644
--- a/src/client/Server.ts
+++ b/src/client/Server.ts
@@ -31,9 +31,9 @@ export class Server {
public static GetDocumentField(doc: Document, key: Key) {
var hackTimeout: number = key == KeyStore.Data ? (this.times++ == 0 ? 5000 : 1000) : key == KeyStore.X ? 2500 : 500;
- return this.GetField(doc._proxies.get(key),
+ return this.GetField(doc._proxies.get(key.Id),
action((fieldfromserver: Field) => {
- doc._proxies.delete(key);
+ doc._proxies.delete(key.Id);
doc.fields.set(key, fieldfromserver);
})
, hackTimeout);
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) {