Skip to content

Commit

Permalink
fix(core): double check for documentElement in smoothScroll detection
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Aug 12, 2021
1 parent 7af4f04 commit ac09e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/get-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function calcSupport() {
const document = getDocument();

return {
smoothScroll: 'scrollBehavior' in document.documentElement.style,
smoothScroll: document.documentElement && 'scrollBehavior' in document.documentElement.style,

touch: !!(
'ontouchstart' in window ||
Expand Down

0 comments on commit ac09e38

Please sign in to comment.