aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/LinkFollower.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/LinkFollower.ts')
-rw-r--r--src/client/util/LinkFollower.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/LinkFollower.ts b/src/client/util/LinkFollower.ts
index 9a0edcfec..0a3a0ba49 100644
--- a/src/client/util/LinkFollower.ts
+++ b/src/client/util/LinkFollower.ts
@@ -50,7 +50,7 @@ export class LinkFollower {
const backLinks = linkDocs.filter(l => isAnchor(sourceDoc, l.link_anchor_2 as Doc)); // link docs where 'sourceDoc' is link_anchor_2
const fwdLinkWithoutTargetView = fwdLinks.find(l => !getView(DocCast(l.link_anchor_2)));
const backLinkWithoutTargetView = backLinks.find(l => !getView(DocCast(l.link_anchor_1)));
- const linkWithoutTargetDoc = traverseBacklink === undefined ? fwdLinkWithoutTargetView ?? backLinkWithoutTargetView : traverseBacklink ? backLinkWithoutTargetView : fwdLinkWithoutTargetView;
+ const linkWithoutTargetDoc = traverseBacklink === undefined ? (fwdLinkWithoutTargetView ?? backLinkWithoutTargetView) : traverseBacklink ? backLinkWithoutTargetView : fwdLinkWithoutTargetView;
const linkDocList = linkWithoutTargetDoc && !sourceDoc.followAllLinks ? [linkWithoutTargetDoc] : traverseBacklink === undefined ? fwdLinks.concat(backLinks) : traverseBacklink ? backLinks : fwdLinks;
const followLinks = sourceDoc.followLinkToggle || sourceDoc.followAllLinks ? linkDocList : linkDocList.slice(0, 1);
let count = 0;
@@ -82,7 +82,7 @@ export class LinkFollower {
willZoomCentered: BoolCast(srcAnchor.followLinkZoom, false),
zoomTime: NumCast(srcAnchor.followLinkTransitionTime, 500),
zoomScale: Cast(srcAnchor.followLinkZoomScale, 'number', null),
- easeFunc: StrCast(srcAnchor.followLinkEase, 'ease') as any,
+ easeFunc: StrCast(srcAnchor.followLinkEase, 'ease') as 'ease' | 'linear',
openLocation: StrCast(srcAnchor.followLinkLocation, OpenWhere.lightbox) as OpenWhere,
effect: srcAnchor,
zoomTextSelections: BoolCast(srcAnchor.followLinkZoomText),