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 <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • 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
Original file line number Diff line number Diff line change
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.