fix(aio): disable search on browsers that don't support web workers
This commit is contained in:
parent
9326e062d8
commit
11505fa0d8
|
@ -108,8 +108,11 @@ export class AppComponent implements OnInit {
|
|||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.searchService.initWorker('app/search/search-worker.js');
|
||||
this.searchService.loadIndex();
|
||||
// Do not initialize the search on browsers that lack web worker support
|
||||
if ('worker' in window) {
|
||||
this.searchService.initWorker('app/search/search-worker.js');
|
||||
this.searchService.loadIndex();
|
||||
}
|
||||
|
||||
this.onResize(window.innerWidth);
|
||||
|
||||
|
|
Loading…
Reference in New Issue