File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/cdk/platform/features Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,9 @@ let scrollBehaviorSupported: boolean|undefined;
3434/** Check whether the browser supports scroll behaviors. */
3535export function supportsScrollBehavior ( ) : boolean {
3636 if ( scrollBehaviorSupported == null ) {
37- // If we're not in the browser, it can't be supported.
38- if ( typeof document !== 'object' || ! document ) {
37+ // If we're not in the browser, it can't be supported. Also check for `Element`, because
38+ // some projects stub out the global `document` during SSR which can throw us off.
39+ if ( typeof document !== 'object' || ! document || typeof Element !== 'function' || ! Element ) {
3940 scrollBehaviorSupported = false ;
4041 return scrollBehaviorSupported ;
4142 }
You can’t perform that action at this time.
0 commit comments