Skip to content

Commit

Permalink
Router might be undefined added safe check (#4198)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKinas authored Oct 24, 2024
1 parent 3fbdc93 commit 093099d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ export class SearchInputComponent implements OnInit, OnDestroy {
}

get onLibrariesSearchResults() {
return this.router.url.indexOf('/search-libraries') === 0;
return this.router?.url.indexOf('/search-libraries') === 0;
}

get onSearchResults() {
return !this.onLibrariesSearchResults && this.router.url.indexOf('/search') === 0;
return !this.onLibrariesSearchResults && this.router?.url.indexOf('/search') === 0;
}

isFilesChecked(): boolean {
Expand Down

0 comments on commit 093099d

Please sign in to comment.