diff options
author | eleanor-park <eleanor_park@brown.edu> | 2024-09-22 15:40:29 -0400 |
---|---|---|
committer | eleanor-park <eleanor_park@brown.edu> | 2024-09-22 15:40:29 -0400 |
commit | 6d0cec80757dcdb07434d7788dd2eb97c2ce4b7c (patch) | |
tree | 58bc45587534b17a5bb340e8e5bafc47a749f14f /src/client/util/DocumentManager.ts | |
parent | 692076b1356309111c4f2cb69cbdbf4be1a825bd (diff) | |
parent | 97c150a2b53ccb27921125d55c9cbf42abf3c588 (diff) |
Merge branch 'eleanor-gptdraw' of https://github.com/brown-dash/Dash-Web into eleanor-gptdraw
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r-- | src/client/util/DocumentManager.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 83b83240e..5ae292760 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -269,8 +269,8 @@ export class DocumentManager { if (options.openLocation?.includes(OpenWhere.lightbox)) { // even if we found the document view, if the target is a lightbox, we try to open it in the lightbox to preserve lightbox semantics (eg, there's only one active doc in the lightbox) const target = DocCast(targetDoc.annotationOn, targetDoc); - const contextView = this.getDocumentView(DocCast(target.embedContainer)); - if (contextView?.ComponentView?.addDocTab?.(target, options.openLocation)) { + const compView = this.getDocumentView(DocCast(target.embedContainer))?.ComponentView; + if ((compView?.addDocTab ?? compView?._props.addDocTab)?.(target, options.openLocation)) { await new Promise<void>(waitres => { setTimeout(() => waitres()); }); |