diff options
author | bobzel <zzzman@gmail.com> | 2024-04-25 18:03:15 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-04-25 18:03:15 -0400 |
commit | 08334824ad07dea1d0bb56d8ef91e3ad1a4573b0 (patch) | |
tree | 66bee872e9223eeb94aaff36a403435261b1cf40 /src/client/views/LightboxView.tsx | |
parent | fa50d38e671197ac333f99178fa3065a19ff834c (diff) |
added toList() for Doc|Doc[]
Diffstat (limited to 'src/client/views/LightboxView.tsx')
-rw-r--r-- | src/client/views/LightboxView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/LightboxView.tsx b/src/client/views/LightboxView.tsx index 24433cd01..0dd836f70 100644 --- a/src/client/views/LightboxView.tsx +++ b/src/client/views/LightboxView.tsx @@ -12,7 +12,7 @@ import { emptyFunction } from '../../Utils'; import { Doc, DocListCast, FieldResult, Opt } from '../../fields/Doc'; import { Id } from '../../fields/FieldSymbols'; import { InkTool } from '../../fields/InkField'; -import { Cast, NumCast } from '../../fields/Types'; +import { Cast, NumCast, toList } from '../../fields/Types'; import { DocUtils } from '../documents/Documents'; import { DocumentManager } from '../util/DocumentManager'; import { LinkManager } from '../util/LinkManager'; @@ -119,7 +119,7 @@ export class LightboxView extends ObservableReactComponent<LightboxViewProps> { } public AddDocTab = (docs: Doc | Doc[], location: OpenWhere, layoutTemplate?: Doc | string) => { - const doc = (docs instanceof Doc ? [docs] : docs).lastElement(); + const doc = toList(docs).lastElement(); return this.SetLightboxDoc( doc, undefined, |