From 4abb1f2aa3636f085d8209d8b0468b29c1cc1279 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 31 Oct 2025 16:32:34 -0500 Subject: [PATCH] refactor: use Object.values() instead of Object.keys() in stringifyValues() (#48741) refactor: use Object.values() instead of Object.keys() in stringifyValues we only used the key to get the value --- lib/common/api/net-client-request.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/common/api/net-client-request.ts b/lib/common/api/net-client-request.ts index a2682da670..057f0390d7 100644 --- a/lib/common/api/net-client-request.ts +++ b/lib/common/api/net-client-request.ts @@ -427,9 +427,8 @@ export class ClientRequest extends Writable implements Electron.ClientRequest { this._started = true; const stringifyValues = (obj: Record) => { const ret: Record = {}; - for (const k of Object.keys(obj)) { - const kv = obj[k]; - ret[kv.name] = kv.value.toString(); + for (const { name, value } of Object.values(obj)) { + ret[name] = value.toString(); } return ret; };