fix(docs-infra): remove the try catch in the test of the browser's capacities (#28368)

PR Close #28368
This commit is contained in:
WilliamKoza 2019-01-25 21:45:46 +01:00 committed by Matias Niemelä
parent 0709f8411d
commit b2a6bf2a80
1 changed files with 2 additions and 6 deletions

View File

@ -49,12 +49,8 @@ export class ScrollService {
fromEvent(window, 'scroll')
.pipe(debounceTime(250)).subscribe(() => this.updateScrollPositionInHistory());
try {
this.supportManualScrollRestoration = !!window && !!window.scrollTo && 'scrollX' in window
&& 'scrollY' in window && !!history && !!history.scrollRestoration;
} catch {
this.supportManualScrollRestoration = false;
}
this.supportManualScrollRestoration = !!window && 'scrollTo' in window && 'scrollX' in window
&& 'scrollY' in window && !!history && 'scrollRestoration' in history;
// Change scroll restoration strategy to `manual` if it's supported
if (this.supportManualScrollRestoration) {