fix(docs-infra): remove the try catch in the test of the browser's capacities (#28368)
PR Close #28368
This commit is contained in:
parent
0709f8411d
commit
b2a6bf2a80
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue