Skip to content

Commit

Permalink
inspector: use String from primordials
Browse files Browse the repository at this point in the history
  • Loading branch information
cola119 committed Aug 1, 2024
1 parent 563596a commit bc992d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/internal/inspector_network_tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const {
ArrayIsArray,
DateNow,
ObjectEntries,
String,
} = primordials;

let dc;
Expand All @@ -18,7 +19,7 @@ const headerObjectToDictionary = (headers = {}) => {
for (const { 0: key, 1: value } of ObjectEntries(headers)) {
if (typeof value === 'string') dict[key] = value;
if (ArrayIsArray(value)) dict[key] = value.join(', ');
else dict[key] = value.toString();
else dict[key] = String(value);
}
return dict;
};
Expand Down

0 comments on commit bc992d7

Please sign in to comment.