Skip to content
Permalink
Browse files

lib: replace var w/ let

replace var w/ let in lib/internal/error-serdes.js

PR-URL: #30386
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
IAmEddieDean authored and MylesBorins committed Nov 12, 2019
1 parent db02965 commit f963409f777ac8d9a7f983943e8e1d5b6f3ab9fd
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/internal/error-serdes.js
@@ -48,7 +48,7 @@ function TryGetAllProperties(object, target = object) {
function GetConstructors(object) {
const constructors = [];

for (var current = object;
for (let current = object;
current !== null;
current = Object.getPrototypeOf(current)) {
const desc = Object.getOwnPropertyDescriptor(current, 'constructor');
@@ -82,7 +82,7 @@ function serializeError(error) {
if (typeof error === 'object' &&
ObjectPrototype.toString(error) === '[object Error]') {
const constructors = GetConstructors(error);
for (var i = 0; i < constructors.length; i++) {
for (let i = 0; i < constructors.length; i++) {
const name = GetName(constructors[i]);
if (errorConstructorNames.has(name)) {
const serialized = serialize({

0 comments on commit f963409

Please sign in to comment.
You can’t perform that action at this time.