Skip to content

Commit

Permalink
Fix type issue
Browse files Browse the repository at this point in the history
- FunctionComponent wants a JSX return, not a string
  • Loading branch information
cee-chen committed Jan 31, 2024
1 parent 6407f8d commit 4858f14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/highlight/_highlight_first.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const HighlightFirst: FunctionComponent<_SharedSubcomponentProps> = memo(

const indexOfMatch = normalizedSearchSubject.indexOf(normalizedSearchValue);
if (indexOfMatch === -1) {
return searchSubject;
return <>{searchSubject}</>;
}

const preMatch = searchSubject.substring(0, indexOfMatch);
Expand Down

0 comments on commit 4858f14

Please sign in to comment.