Skip to content

Commit

Permalink
Merge pull request #783 from Financial-Times/fix-include-highlights-i…
Browse files Browse the repository at this point in the history
…nitial-value

Fix includeHighlights initial value
  • Loading branch information
jamesr101 authored Aug 29, 2024
2 parents 440d393 + 633700b commit 67ee754
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions components/x-gift-article/src/GiftArticle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ const withGiftFormActions = withActions(
return (state) => {
state.highlight = document.querySelector(`.${state.highlightClassName}`)?.textContent
state.highlightClassName = document.querySelector(`.${state.highlightClassName}`)?.classList.value
return { highlight: state.highlight, highlightClassName: state.highlightClassName }
state.includeHighlights = true
return {
highlight: state.highlight,
highlightClassName: state.highlightClassName,
includeHighlights: state.includeHighlights
}
}
}
}
Expand Down Expand Up @@ -296,7 +301,7 @@ const withGiftFormActions = withActions(
isGiftUrlCreated: false,
isGiftUrlShortened: false,
isNonGiftUrlShortened: false,
includeHighlights: true,
includeHighlights: props.highlight !== undefined,
showAdvancedSharingOptions: false,
showNonSubscriberOptions: false,
highlight: undefined,
Expand Down

0 comments on commit 67ee754

Please sign in to comment.