diff options
author | bobzel <zzzman@gmail.com> | 2022-03-31 12:01:37 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-03-31 12:01:37 -0400 |
commit | 85c24ec4dcc39551e8c7de83d3482ec15472c030 (patch) | |
tree | d522dd509ccc0f02cc00515d3b15fc34ed9f6880 /src/client/views/nodes/LinkDocPreview.tsx | |
parent | 24c4443cc097694a12c26b1e5aa1c7a7930625c1 (diff) |
added autoLinks to formattedTextBoxes. Set auto link target by titling documents with a prefix '@'.
Diffstat (limited to 'src/client/views/nodes/LinkDocPreview.tsx')
-rw-r--r-- | src/client/views/nodes/LinkDocPreview.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/LinkDocPreview.tsx b/src/client/views/nodes/LinkDocPreview.tsx index 2e29c0656..46736aa4e 100644 --- a/src/client/views/nodes/LinkDocPreview.tsx +++ b/src/client/views/nodes/LinkDocPreview.tsx @@ -83,7 +83,7 @@ export class LinkDocPreview extends React.Component<LinkDocPreviewProps> { const anchorDoc = href.replace(Doc.localServerPath(), "").split("?")[0]; anchorDoc && DocServer.GetRefField(anchorDoc).then(action(anchor => { if (anchor instanceof Doc && DocListCast(anchor.links).length) { - this._linkDoc = DocListCast(anchor.links)[0]; + this._linkDoc = this._linkDoc ?? DocListCast(anchor.links)[0]; this._linkSrc = anchor; const linkTarget = LinkManager.getOppositeAnchor(this._linkDoc, this._linkSrc); this._targetDoc = linkTarget?.type === DocumentType.MARKER && linkTarget?.annotationOn ? Cast(linkTarget.annotationOn, Doc, null) ?? linkTarget : linkTarget; |