We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9240e54 commit bcb419cCopy full SHA for bcb419c
lib/internal/error-serdes.js
@@ -54,7 +54,7 @@ function TryGetAllProperties(object, target = object) {
54
function GetConstructors(object) {
55
const constructors = [];
56
57
- for (var current = object;
+ for (let current = object;
58
current !== null;
59
current = ObjectGetPrototypeOf(current)) {
60
const desc = ObjectGetOwnPropertyDescriptor(current, 'constructor');
@@ -88,7 +88,7 @@ function serializeError(error) {
88
if (typeof error === 'object' &&
89
ObjectPrototypeToString(error) === '[object Error]') {
90
const constructors = GetConstructors(error);
91
- for (var i = 0; i < constructors.length; i++) {
+ for (let i = 0; i < constructors.length; i++) {
92
const name = GetName(constructors[i]);
93
if (errorConstructorNames.has(name)) {
94
const serialized = serialize({
0 commit comments