mirror of
https://github.com/desktop/desktop
synced 2024-10-30 06:03:10 +00:00
A little bit cleaner
This commit is contained in:
parent
0a01bddc1f
commit
6cdbde9e75
1 changed files with 1 additions and 5 deletions
|
@ -1580,13 +1580,9 @@ export class SideBySideDiff extends React.Component<
|
|||
private onSearch = (searchQuery: string, direction: SearchDirection) => {
|
||||
const { searchResults } = this.state
|
||||
|
||||
// If the query is unchanged and we've got tokens we'll continue, else we'll restart
|
||||
if (searchQuery?.trim() === '') {
|
||||
this.resetSearch(true, 'No results')
|
||||
} else if (
|
||||
searchQuery === this.state.searchQuery &&
|
||||
searchResults !== undefined
|
||||
) {
|
||||
} else if (searchQuery === this.state.searchQuery && searchResults) {
|
||||
this.continueSearch(searchResults, direction)
|
||||
} else {
|
||||
this.startSearch(searchQuery, direction)
|
||||
|
|
Loading…
Reference in a new issue