Skip to content

Commit

Permalink
lib: replace var w/ let
Browse files Browse the repository at this point in the history
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 gireeshpunathil committed Nov 26, 2019
1 parent 9240e54 commit bcb419c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/error-serdes.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function TryGetAllProperties(object, target = object) {
function GetConstructors(object) {
const constructors = [];

for (var current = object;
for (let current = object;
current !== null;
current = ObjectGetPrototypeOf(current)) {
const desc = ObjectGetOwnPropertyDescriptor(current, 'constructor');
Expand Down Expand Up @@ -88,7 +88,7 @@ function serializeError(error) {
if (typeof error === 'object' &&
ObjectPrototypeToString(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({
Expand Down

0 comments on commit bcb419c

Please sign in to comment.