Remove conditional that will never happen
This commit is contained in:
parent
e90bb633b9
commit
9bdf1d814a
@ -249,10 +249,7 @@ describe('GlobalSearchComponent', () => {
|
||||
expect(blurSpy).toHaveBeenCalled()
|
||||
|
||||
component.searchResults = { total: 1 } as any
|
||||
component.resultsDropdown.close()
|
||||
const openSpy = jest.spyOn(component.resultsDropdown, 'open')
|
||||
component.searchInputKeyDown(new KeyboardEvent('keydown', { key: 'Enter' }))
|
||||
expect(openSpy).toHaveBeenCalled()
|
||||
component.resultsDropdown.open()
|
||||
|
||||
component.searchInputKeyDown(
|
||||
new KeyboardEvent('keydown', { key: 'ArrowDown' })
|
||||
|
@ -277,8 +277,6 @@ export class GlobalSearchComponent implements OnInit {
|
||||
} else if (this.query?.length) {
|
||||
this.runAdvanedSearch()
|
||||
this.reset(true)
|
||||
} else if (this.searchResults?.total && !this.resultsDropdown.isOpen()) {
|
||||
this.resultsDropdown.open()
|
||||
}
|
||||
} else if (event.key === 'Escape' && !this.resultsDropdown.isOpen()) {
|
||||
if (this.query?.length) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user