bug(cdk/platform.): scrolling.ts SSR build Element is not defined #22259
Labels
area: cdk/platform
P3
An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Hello, I had an issue for SSR building with cdk/platform at this line https://github.com/angular/components/blob/master/src/cdk/platform/features/scrolling.ts#L49:
const scrollToFunction: Function|undefined = Element.prototype.scrollTo;
-> ReferenceError: Element is not defined
Environment
"@angular/animations": "^11.2.5",
"@angular/cdk": "^11.2.4",
"@angular/common": "^11.2.5",
"@angular/compiler": "^11.2.5",
"@angular/core": "^11.2.5",
"@angular-devkit/architect": "^0.1101.4",
"@angular-devkit/build-angular": "^0.1101.4",
"@angular/cli": "^11.1.4",
"@angular/compiler-cli": "~11.2.5",
"@angular/language-service": "^11.2.5",
The text was updated successfully, but these errors were encountered: