fix window undefined error when ssr some pages (#21295)

fix
This commit is contained in:
Jordi Enric authored and GitHub committed 2024-02-15 12:52:57 +00:00
1 parent 46051bce17
commit cf1264f614
1 file changed
+1
+1
View File
@@ -219,6 +219,7 @@ export const detectBrowser = () => {
}
export const detectOS = () => {
if (typeof window === 'undefined' || !window) return undefined
if (typeof navigator === 'undefined' || !navigator) return undefined
const userAgent = window.navigator.userAgent.toLowerCase()