Desktop: Resolves #5299: Display 0/0 when no search results are found in editor (#5360)

pull/5488/head
Nikhil Gautam 2021-09-19 16:07:33 +05:30 committed by GitHub
parent 7a9ec627ee
commit 0d40026d8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -139,9 +139,10 @@ class NoteSearchBarComponent extends React.Component {
color: theme.colorFaded,
backgroundColor: theme.backgroundColor,
});
const matchesFoundString = (query.length > 0 && this.props.resultCount > 0) ? (
const matchesFoundString = (query.length > 0) ? (
<div style={textStyle}>
{`${this.props.selectedIndex + 1} / ${this.props.resultCount}`}
{`${this.props.resultCount === 0 ? 0 : this.props.selectedIndex + 1} / ${this.props.resultCount}`}
</div>
) : null;