diff options
| author | bobzel <zzzman@gmail.com> | 2024-03-30 16:13:31 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-03-30 16:13:31 -0400 |
| commit | aeeebf6d83868d4a5040e9632503511617242c55 (patch) | |
| tree | b22975f38863b24d7ed2f9d089a3f91fcd60858d /src/client/views/nodes/LinkDocPreview.tsx | |
| parent | a6d075f6ed10b2900ca7d900168dda19540fdcc7 (diff) | |
updated and fixed wiki link to use @(wiki:...) and fixed linkManager from infinite looping on relatedlinker(). fixed clicking in text exxeptions.
Diffstat (limited to 'src/client/views/nodes/LinkDocPreview.tsx')
| -rw-r--r-- | src/client/views/nodes/LinkDocPreview.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/LinkDocPreview.tsx b/src/client/views/nodes/LinkDocPreview.tsx index 4b6ee7d72..c9c8f9260 100644 --- a/src/client/views/nodes/LinkDocPreview.tsx +++ b/src/client/views/nodes/LinkDocPreview.tsx @@ -185,8 +185,9 @@ export class LinkDocPreview extends ObservableReactComponent<LinkDocPreviewProps LinkFollower.FollowLink(this._linkDoc, this._linkSrc, false); } else if (this._props.hrefs?.length) { const webDoc = - Array.from(SearchUtil.SearchCollection(Doc.MyFilesystem, this._props.hrefs[0], false).keys()).lastElement() ?? - Docs.Create.WebDocument(this._props.hrefs[0], { title: this._props.hrefs[0], _nativeWidth: 850, _width: 200, _height: 400, data_useCors: true }); + Array.from(SearchUtil.SearchCollection(Doc.MyFilesystem, this._props.hrefs[0], false).keys()) + .filter(doc => doc.type === DocumentType.WEB) + .lastElement() ?? Docs.Create.WebDocument(this._props.hrefs[0], { title: this._props.hrefs[0], _nativeWidth: 850, _width: 200, _height: 400, data_useCors: true }); DocumentManager.Instance.showDocument(webDoc, { openLocation: OpenWhere.lightbox, willPan: true, |
