summaryrefslogtreecommitdiff
path: root/components/Sidebar/Backlinks.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2022-01-29 15:50:45 +0100
committerThomas F. K. Jorna <[email protected]>2022-01-29 15:50:45 +0100
commit7da981397e9f0700d39d144b2b2591c127f2786a (patch)
tree86730114dde5d3bd872f088ead3d684fb50392cb /components/Sidebar/Backlinks.tsx
parent835c0029db437c7c2efff18f718a792ae5a1ccc0 (diff)
fix(preview): change typing on previewnode for backlinks
Diffstat (limited to 'components/Sidebar/Backlinks.tsx')
-rw-r--r--components/Sidebar/Backlinks.tsx4
1 files changed, 2 insertions, 2 deletions
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) => {