diff options
author | bob <bcz@cs.brown.edu> | 2019-02-19 12:43:46 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-02-19 12:43:46 -0500 |
commit | 260e0a361fefea686807d5b1cf8445ddc3f3045c (patch) | |
tree | 842f14532aee5dbf52b804b317838559296daf9e /src/client/Server.ts | |
parent | 98f5f8200ad98f93f14eb97af9fdc6619dabe442 (diff) | |
parent | 39c6ba3292467979e310f3b577041c2f5e38273f (diff) |
converting main to use a DockingView
Diffstat (limited to 'src/client/Server.ts')
-rw-r--r-- | src/client/Server.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/Server.ts b/src/client/Server.ts index 69780a7b5..76f182e41 100644 --- a/src/client/Server.ts +++ b/src/client/Server.ts @@ -16,7 +16,7 @@ export class Server { // Retrieves the cached value of the field and sends a request to the server for the real value (if it's not cached). // Call this is from within a reaction and test whether the return value is FieldWaiting. // 'hackTimeout' is here temporarily for simplicity when debugging things. - public static GetField(fieldid: FieldId, callback: (field: Opt<Field>) => void): void { + public static GetField(fieldid: FieldId, callback: (field: Opt<Field>) => void): Opt<Field> | FIELD_WAITING { let cached = this.ClientFieldsCached.get(fieldid); if (!cached) { this.ClientFieldsCached.set(fieldid, FieldWaiting); @@ -45,6 +45,7 @@ export class Server { } }) } + return cached; } public static GetFields(fieldIds: FieldId[], callback: (fields: { [id: string]: Field }) => any) { |