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 5c40b2f commit b18b056Copy full SHA for b18b056
lib/internal/error-serdes.js
@@ -48,7 +48,7 @@ function TryGetAllProperties(object, target = object) {
48
function GetConstructors(object) {
49
const constructors = [];
50
51
- for (var current = object;
+ for (let current = object;
52
current !== null;
53
current = Object.getPrototypeOf(current)) {
54
const desc = Object.getOwnPropertyDescriptor(current, 'constructor');
@@ -82,7 +82,7 @@ function serializeError(error) {
82
if (typeof error === 'object' &&
83
ObjectPrototype.toString(error) === '[object Error]') {
84
const constructors = GetConstructors(error);
85
- for (var i = 0; i < constructors.length; i++) {
+ for (let i = 0; i < constructors.length; i++) {
86
const name = GetName(constructors[i]);
87
if (errorConstructorNames.has(name)) {
88
const serialized = serialize({
0 commit comments