From 5b253eee1189d6a1f1213ff1d5e219de4a717f92 Mon Sep 17 00:00:00 2001 From: nickschot Date: Fri, 9 Feb 2024 10:05:23 +0100 Subject: [PATCH] Fix body-scroll-lock.js FastBoot compatibility --- ember-mobile-menu/src/utils/body-scroll-lock.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ember-mobile-menu/src/utils/body-scroll-lock.js b/ember-mobile-menu/src/utils/body-scroll-lock.js index 6f4fbda37..8cc78d7e1 100644 --- a/ember-mobile-menu/src/utils/body-scroll-lock.js +++ b/ember-mobile-menu/src/utils/body-scroll-lock.js @@ -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; @@ -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) ||