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 MylesBorins committed Dec 17, 2019
1 parent 7a25c2c commit cbe29ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/internal/console/constructor.js
Expand Up @@ -115,12 +115,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 cbe29ce

Please sign in to comment.