window.navigator has already been used

This commit is contained in:
Andrew Murray 2023-11-28 19:41:16 +11:00
parent cf97e8644d
commit 06687642b5

View File

@ -1,7 +1,7 @@
// Based on https://stackoverflow.com/a/38241481/724176
function getOS() {
const userAgent = window.navigator.userAgent,
platform = window.navigator?.userAgentData?.platform || window.navigator.platform,
platform = window.navigator.userAgentData?.platform || window.navigator.platform,
macosPlatforms = ["macOS", "Macintosh", "MacIntel", "MacPPC", "Mac68K"],
windowsPlatforms = ["Win32", "Win64", "Windows", "WinCE"];