diff options
Diffstat (limited to 'src/helpers/userAgent-helpers.ts')
-rw-r--r-- | src/helpers/userAgent-helpers.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/helpers/userAgent-helpers.ts b/src/helpers/userAgent-helpers.ts index a89207326..bc99fbc52 100644 --- a/src/helpers/userAgent-helpers.ts +++ b/src/helpers/userAgent-helpers.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { cpus } from 'os'; | 1 | import { cpus } from 'node:os'; |
2 | import macosVersion from 'macos-version'; | 2 | import macosVersion from 'macos-version'; |
3 | import { chrome } from 'useragent-generator'; | 3 | import { chrome } from 'useragent-generator'; |
4 | import { | 4 | import { |
@@ -14,6 +14,7 @@ function macOS() { | |||
14 | const version = macosVersion() ?? ''; | 14 | const version = macosVersion() ?? ''; |
15 | let cpuName = cpus()[0].model.split(' ')[0]; | 15 | let cpuName = cpus()[0].model.split(' ')[0]; |
16 | if (cpuName && /\(/.test(cpuName)) { | 16 | if (cpuName && /\(/.test(cpuName)) { |
17 | // eslint-disable-next-line prefer-destructuring | ||
17 | cpuName = cpuName.split('(')[0]; | 18 | cpuName = cpuName.split('(')[0]; |
18 | } | 19 | } |
19 | return `Macintosh; ${cpuName} Mac OS X ${version.replaceAll('.', '_')}`; | 20 | return `Macintosh; ${cpuName} Mac OS X ${version.replaceAll('.', '_')}`; |