mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user