diff options
author | bobzel <zzzman@gmail.com> | 2023-09-07 01:28:27 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-09-07 01:28:27 -0400 |
commit | e847215964bc02cf402eace30d6c9e19f5f0f0cf (patch) | |
tree | e6ae82b46c18e355af98405d11b5ad2191b872c2 /src/client/DocServer.ts | |
parent | df4f2c01db206e54a4ada7c9210d89dc56d48438 (diff) |
truncate link descriptions over link lines. Fix schema view issues with multiline inputs. fix '#' field assignment for title bar of docs. fixed dashFieldView to read fields from texstbox by fixing FindDocByTitle to not match undefind. Don't end link_description input on Enter to allow multiline inputs.
Diffstat (limited to 'src/client/DocServer.ts')
-rw-r--r-- | src/client/DocServer.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/DocServer.ts b/src/client/DocServer.ts index 5fdea131b..fc8a9f3d6 100644 --- a/src/client/DocServer.ts +++ b/src/client/DocServer.ts @@ -32,9 +32,11 @@ export namespace DocServer { let _cache: { [id: string]: RefField | Promise<Opt<RefField>> } = {}; export function FindDocByTitle(title: string) { - const foundDocId = Array.from(Object.keys(_cache)) - .filter(key => _cache[key] instanceof Doc) - .find(key => (_cache[key] as Doc).title === title); + const foundDocId = + title && + Array.from(Object.keys(_cache)) + .filter(key => _cache[key] instanceof Doc) + .find(key => (_cache[key] as Doc).title === title); return foundDocId ? (_cache[foundDocId] as Doc) : undefined; } |