Skip to content

Commit

Permalink
Fix specific resource target id post-vault update.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathewjordan committed Nov 18, 2024
1 parent c04de53 commit 0f8bd3a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/Scroll/Items/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ const ScrollItem: React.FC<ScrollItemProps> = ({
const canvas = vault?.get(item) as CanvasNormalized;

const numItems = annotations?.filter(
(annotation) => annotation.target === item.id,
// @ts-ignore
(annotation) => annotation.target?.source?.id === item.id,
).length;

const annotationBody = annotations
?.filter((annotation) => annotation.target === item.id)
// @ts-ignore
?.filter((annotation) => annotation.target?.source?.id === item.id)
?.map((annotation) => {
return annotation?.body?.map((body, index) => (
<ScrollItemBody
Expand Down

0 comments on commit 0f8bd3a

Please sign in to comment.