Skip to content

Commit e50b88c

Browse files
committed
browser guard isLinux
1 parent 1e145aa commit e50b88c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/lib/utils/platform.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@ export const isWindows = () => {
99
return FORCE_WINDOWS || (globalThis.navigator.userAgent.toLowerCase().includes("windows") ?? false)
1010
}
1111

12-
export const isLinux = () => globalThis.navigator.userAgent.toLowerCase().includes("linux") ?? false
12+
export const isLinux = () => {
13+
if (!browser) return false;
14+
return globalThis.navigator.userAgent.toLowerCase().includes("linux") ?? false
15+
}

0 commit comments

Comments
 (0)