diff options
author | bobzel <zzzman@gmail.com> | 2024-09-12 13:40:16 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-09-12 13:40:16 -0400 |
commit | 7deef9a2e4fb27521a16734f212092aaba0a11a6 (patch) | |
tree | 9039e1dc475413c767ef724189580a077673fa1f /src/client/util/DocumentManager.ts | |
parent | 484e85d4448cd56d096a1b234d2a98a638e08c77 (diff) | |
parent | 623da0b4eec34fbd238cc26a5e0c105426a6711e (diff) |
Merge branch 'master' into keanu-comments
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()); }); |