diff --git a/aio/src/app/app.component.ts b/aio/src/app/app.component.ts index aedd009f1b..933f1ce228 100644 --- a/aio/src/app/app.component.ts +++ b/aio/src/app/app.component.ts @@ -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);