Skip to content

Commit

Permalink
fix: typing of icon src
Browse files Browse the repository at this point in the history
  • Loading branch information
bigaru committed Apr 10, 2024
1 parent 233bcdc commit 3f2b2f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/globalScript/lighthouse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export interface DiscoveredItem {
contentType: string
blockType: string
blockTitle: string
icon: React.ReactNode
icon?: React.ReactNode
}

function flattenToRawItem(root: Root): RawValueItem[] {
Expand Down Expand Up @@ -187,7 +187,7 @@ function mapToDiscoveredItem(rawItems: RawValueItem[]): DiscoveredItem[] {
}

const block = select('core/blocks').getBlockType(item.blockType)
return { ...item, blockTitle: block?.title ?? '', icon: block?.icon?.src }
return { ...item, blockTitle: block?.title ?? '', icon: block?.icon?.src as React.ReactElement }
})
}

Expand Down

0 comments on commit 3f2b2f5

Please sign in to comment.