diff --git a/packages/common/src/viewport_scroller.ts b/packages/common/src/viewport_scroller.ts index d3ff85d6fd..d3aa129feb 100644 --- a/packages/common/src/viewport_scroller.ts +++ b/packages/common/src/viewport_scroller.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ErrorHandler, ɵɵdefineInjectable, ɵɵinject} from '@angular/core'; +import {ɵɵdefineInjectable, ɵɵinject} from '@angular/core'; import {DOCUMENT} from './dom_tokens'; @@ -24,7 +24,7 @@ export abstract class ViewportScroller { static ɵprov = ɵɵdefineInjectable({ token: ViewportScroller, providedIn: 'root', - factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window, ɵɵinject(ErrorHandler)) + factory: () => new BrowserViewportScroller(ɵɵinject(DOCUMENT), window) }); /** @@ -67,7 +67,7 @@ export abstract class ViewportScroller { export class BrowserViewportScroller implements ViewportScroller { private offset: () => [number, number] = () => [0, 0]; - constructor(private document: any, private window: any, private errorHandler: ErrorHandler) {} + constructor(private document: any, private window: any) {} /** * Configures the top offset used when scrolling to an anchor. diff --git a/packages/common/test/viewport_scroller_spec.ts b/packages/common/test/viewport_scroller_spec.ts index 90713e62fd..11e5d7b9a1 100644 --- a/packages/common/test/viewport_scroller_spec.ts +++ b/packages/common/test/viewport_scroller_spec.ts @@ -19,7 +19,7 @@ describe('BrowserViewportScroller', () => { jasmine.createSpyObj('window', ['history', 'scrollTo', 'pageXOffset', 'pageYOffset']); windowSpy.history.scrollRestoration = 'auto'; documentSpy = jasmine.createSpyObj('document', ['getElementById', 'getElementsByName']); - scroller = new BrowserViewportScroller(documentSpy, windowSpy, null!); + scroller = new BrowserViewportScroller(documentSpy, windowSpy); }); describe('setHistoryScrollRestoration', () => {