From 0e2637f8517cada6c41431741caa8826be602f99 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Sun, 24 Sep 2023 12:23:25 +0300 Subject: fix(ext/node): simplified array.from + map (#20653) `Array.from` has optional second argument. Calling `map` is not required for this case. --- ext/node/polyfills/os.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') 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, -- cgit v1.2.3