From 7da981397e9f0700d39d144b2b2591c127f2786a Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Sat, 29 Jan 2022 15:50:45 +0100 Subject: fix(preview): change typing on previewnode for backlinks --- components/Sidebar/Backlinks.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components') diff --git a/components/Sidebar/Backlinks.tsx b/components/Sidebar/Backlinks.tsx index 7796a66..6a5dd00 100644 --- a/components/Sidebar/Backlinks.tsx +++ b/components/Sidebar/Backlinks.tsx @@ -8,7 +8,7 @@ import React from 'react' import { ProcessedOrg } from '../../util/processOrg' export interface BacklinksProps { - previewNode: OrgRoamNode + previewNode: NodeObject | OrgRoamNode setPreviewNode: any nodeById: NodeById linksByNodeId: LinksByNodeId @@ -37,7 +37,7 @@ export const Backlinks = (props: BacklinksProps) => { macros, attachDir, } = props - const links = linksByNodeId[previewNode?.id] ?? [] + const links = linksByNodeId[(previewNode as OrgRoamNode)?.id] ?? [] const backLinks = links .filter((link: LinkObject) => { -- cgit v1.2.3