Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/internal/error-serdes.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function TryGetAllProperties(object, target = object) {
function GetConstructors(object) {
const constructors = [];

for (var current = object;
for (let current = object;
trivikr marked this conversation as resolved.
Show resolved Hide resolved
current !== null;
current = Object.getPrototypeOf(current)) {
const desc = Object.getOwnPropertyDescriptor(current, 'constructor');
Expand Down Expand Up @@ -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({
Expand Down