Skip to content

Commit bc992d7

Browse files
committed
inspector: use String from primordials
1 parent 563596a commit bc992d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/inspector_network_tracking.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const {
44
ArrayIsArray,
55
DateNow,
66
ObjectEntries,
7+
String,
78
} = primordials;
89

910
let dc;
@@ -18,7 +19,7 @@ const headerObjectToDictionary = (headers = {}) => {
1819
for (const { 0: key, 1: value } of ObjectEntries(headers)) {
1920
if (typeof value === 'string') dict[key] = value;
2021
if (ArrayIsArray(value)) dict[key] = value.join(', ');
21-
else dict[key] = value.toString();
22+
else dict[key] = String(value);
2223
}
2324
return dict;
2425
};

0 commit comments

Comments
 (0)