We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9214a3e commit e8e8662Copy full SHA for e8e8662
src/cdk/platform/features/scrolling.ts
@@ -42,7 +42,7 @@ export function supportsScrollBehavior(): boolean {
42
}
43
44
// If the element can have a `scrollBehavior` style, we can be sure that it's supported.
45
- if ('scrollBehavior' in document.documentElement!.style) {
+ if (document.documentElement?.style && 'scrollBehavior' in document.documentElement!.style) {
46
scrollBehaviorSupported = true;
47
} else {
48
// At this point we have 3 possibilities: `scrollTo` isn't supported at all, it's
0 commit comments