Allow the highlights attribute of articles to be undefined

This commit is contained in:
Jackson Harper
2024-08-23 14:24:00 +08:00
parent 2c7a88de81
commit fe1567fa78
2 changed files with 2 additions and 2 deletions

View File

@ -520,7 +520,7 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
viewer={props.viewer}
item={props.article}
scrollToHighlight={highlightHref}
highlights={props.article.highlights}
highlights={props.article.highlights ?? []}
isAppleAppEmbed={props.isAppleAppEmbed}
highlightBarDisabled={props.highlightBarDisabled}
showHighlightsModal={props.showHighlightsModal}

View File

@ -982,7 +982,7 @@ export type ArticleAttributes = {
folder: string
savedByViewer?: boolean
content: string
highlights: Highlight[]
highlights?: Highlight[]
linkId: string
labels?: Label[]
state?: State