Skip to content

Commit

Permalink
fix: error when submitting consecutive search after submitting search…
Browse files Browse the repository at this point in the history
… from search suggestion (#1332)
  • Loading branch information
shauke authored Nov 30, 2022
1 parent 3e293fa commit 9d063a9
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export class SearchBoxComponent implements OnInit, OnDestroy {
// something was selected via keyboard
this.searchResults$.pipe(take(1), takeUntil(this.destroy$)).subscribe(results => {
this.router.navigate(['/search', results[this.activeIndex].term]);
this.activeIndex = -1;
});
} else {
this.router.navigate(['/search', suggestedTerm]);
Expand Down

0 comments on commit 9d063a9

Please sign in to comment.