Skip to content

Commit

Permalink
lib: change var to let/const
Browse files Browse the repository at this point in the history
PR-URL: #30910
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
rene.herrmann authored and targos committed Jan 14, 2020
1 parent 67a2a47 commit 0266d7f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/internal/console/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,11 @@ function Console(options /* or: stdout, stderr, ignoreErrors = true */) {

// Bind the prototype functions to this Console instance
const keys = ObjectKeys(Console.prototype);
for (var v = 0; v < keys.length; v++) {
var k = keys[v];
for (const key of keys) {
// We have to bind the methods grabbed from the instance instead of from
// the prototype so that users extending the Console can override them
// from the prototype chain of the subclass.
this[k] = this[k].bind(this);
this[key] = this[key].bind(this);
}

this[kBindStreamsEager](stdout, stderr);
Expand Down

0 comments on commit 0266d7f

Please sign in to comment.