Skip to content

Commit

Permalink
Fix body-scroll-lock.js FastBoot compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nickschot committed Feb 9, 2024
1 parent e6a5d72 commit 5b253ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ember-mobile-menu/src/utils/body-scroll-lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
// https://stackoverflow.com/questions/41594997/ios-10-safari-prevent-scrolling-behind-a-fixed-overlay-and-maintain-scroll-posi

let hasPassiveEvents = false;
if (typeof window !== 'undefined') {
if (typeof window !== 'undefined' && typeof FastBoot === 'undefined') {
const passiveTestOptions = {
get passive() {
hasPassiveEvents = true;
Expand All @@ -41,6 +41,7 @@ if (typeof window !== 'undefined') {

const isIosDevice =
typeof window !== 'undefined' &&
typeof FastBoot === 'undefined' &&
window.navigator &&
window.navigator.platform &&
(/iP(ad|hone|od)/.test(window.navigator.platform) ||
Expand Down

0 comments on commit 5b253ee

Please sign in to comment.