diff options
author | yipstanley <stanley_yip@brown.edu> | 2019-02-13 20:17:21 -0500 |
---|---|---|
committer | yipstanley <stanley_yip@brown.edu> | 2019-02-13 20:17:21 -0500 |
commit | f3544f004a696e4682fbd8d1f18ac69beec59439 (patch) | |
tree | 0839c355fe813ba494c6451b9017c5e325e1cfb8 /src/fields/Key.ts | |
parent | 430878f6dd8d36b1322e15d0898ada0d44fecacb (diff) |
asdfkj
Diffstat (limited to 'src/fields/Key.ts')
-rw-r--r-- | src/fields/Key.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fields/Key.ts b/src/fields/Key.ts index ffcbfc8b4..1e878a361 100644 --- a/src/fields/Key.ts +++ b/src/fields/Key.ts @@ -3,6 +3,7 @@ import { Utils } from "../Utils"; import { observable } from "mobx"; import { Types } from "../server/Message"; import { ObjectID } from "bson"; +import { Server } from "../client/Server"; export class Key extends Field { private name: string; @@ -15,6 +16,7 @@ export class Key extends Field { super(id || Utils.GenerateDeterministicGuid(name)); this.name = name; + Server.UpdateField(this) } TrySetValue(value: any): boolean { @@ -33,11 +35,11 @@ export class Key extends Field { return name; } - ToJson(): { type: Types, data: string, _id: ObjectID } { + ToJson(): { type: Types, data: string, _id: string } { return { type: Types.Key, data: this.name, - _id: new ObjectID(this.Id) + _id: this.Id } } } |