diff options
author | bobzel <zzzman@gmail.com> | 2020-08-02 13:06:03 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-02 13:06:03 -0400 |
commit | aa9a1bb38f0c7100629a0096c12b54a0aeab2b6c (patch) | |
tree | b15108b87e322bd6981fafb38b7c30f367f8f7e8 | |
parent | ccc8e9b17b70fa2ba1c45f1212c2abf187f9f3c3 (diff) |
more server console messages
-rw-r--r-- | src/client/DocServer.ts | 1 | ||||
-rw-r--r-- | src/server/websocket.ts | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts index 6fa8cf909..95b17bbb5 100644 --- a/src/client/DocServer.ts +++ b/src/client/DocServer.ts @@ -329,6 +329,7 @@ export namespace DocServer { map[id] = cached; } } + if (!requestedIds.length) return ({}); // 2) synchronously, we emit a single callback to the server requesting the serialized (i.e. represented by a string) // fields for the given ids. This returns a promise, which, when resolved, indicates that all the JSON serialized versions of diff --git a/src/server/websocket.ts b/src/server/websocket.ts index 8bcec7d70..f6dfa0ff1 100644 --- a/src/server/websocket.ts +++ b/src/server/websocket.ts @@ -209,12 +209,13 @@ export namespace WebSocket { } function GetRefField([id, callback]: [string, (result?: Transferable) => void]) { + console.log(green(`> 1 field`)); Database.Instance.getDocument(id, callback); } function GetRefFields([ids, callback]: [string[], (result?: Transferable[]) => void]) { - console.log(green(`Returning ${ids.length} fields`)); - Database.Instance.getDocuments(ids, callback); + console.log(green(`> ${ids.length} fields`)); + ids.length && Database.Instance.getDocuments(ids, callback); } const suffixMap: { [type: string]: (string | [string, string | ((json: any) => any)]) } = { |