Only mark the term when there is result from search.

This commit is contained in:
jtoehen 2022-01-04 19:04:12 +08:00 committed by GitHub
parent 2474b76d0d
commit 272fff0ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,10 @@ export class SearchBox extends React.PureComponent<SearchBoxProps, SearchBoxStat
results, results,
noResults: results.length === 0, noResults: results.length === 0,
}); });
this.props.marker.mark(term);
if (results.length > 0) {
this.props.marker.mark(term);
}
} }
@bind @bind