diff --git a/src/utils/detect-safari.js b/src/utils/detect-safari.js index c6e2de85f1..e24518e54c 100644 --- a/src/utils/detect-safari.js +++ b/src/utils/detect-safari.js @@ -2,5 +2,6 @@ import { detect } from "detect-browser"; export function isSafari() { const browser = detect(); - return ["iOS", "Mac OS"].includes(browser.os) && ["safari", "ios"].includes(browser.name) + if (!browser) return false; + return ["iOS", "Mac OS"].includes(browser.os) && ["safari", "ios"].includes(browser.name); }