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
This commit is contained in:
Charles Kerr
2025-10-31 16:32:34 -05:00
committed by GitHub
parent 310490221e
commit 4abb1f2aa3

View File

@@ -427,9 +427,8 @@ export class ClientRequest extends Writable implements Electron.ClientRequest {
this._started = true;
const stringifyValues = (obj: Record<string, { name: string, value: string | string[] }>) => {
const ret: Record<string, string> = {};
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;
};