diff options
author | Mikhail <connormiha1@gmail.com> | 2023-09-24 12:23:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 11:23:25 +0200 |
commit | 0e2637f8517cada6c41431741caa8826be602f99 (patch) | |
tree | a586de0ed6b72f50f5d526db33e556154270cdec | |
parent | d955d66a3f8c82a2286739cbb2d2ec657119163f (diff) |
fix(ext/node): simplified array.from + map (#20653)
`Array.from` has optional second argument. Calling `map` is not required
for this case.
-rw-r--r-- | ext/node/polyfills/os.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/os.ts b/ext/node/polyfills/os.ts index c552b5a0a..3245ad7ab 100644 --- a/ext/node/polyfills/os.ts +++ b/ext/node/polyfills/os.ts @@ -126,7 +126,7 @@ export function arch(): string { (uptime as any)[Symbol.toPrimitive] = (): number => uptime(); export function cpus(): CPUCoreInfo[] { - return Array.from(Array(navigator.hardwareConcurrency)).map(() => { + return Array.from(Array(navigator.hardwareConcurrency), () => { return { model: "", speed: 0, |