We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f37ab79 commit 4ee9220Copy full SHA for 4ee9220
lib/tty.js
@@ -55,7 +55,7 @@ function WriteStream(fd) {
55
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
56
this._handle.setBlocking(process.env.NODE_TTY_UNSAFE_ASYNC !== '1');
57
58
- var winSize = [];
+ var winSize = new Array(2);
59
var err = this._handle.getWindowSize(winSize);
60
if (!err) {
61
this.columns = winSize[0];
@@ -72,7 +72,7 @@ WriteStream.prototype.isTTY = true;
72
WriteStream.prototype._refreshSize = function() {
73
var oldCols = this.columns;
74
var oldRows = this.rows;
75
76
77
if (err) {
78
this.emit('error', errnoException(err, 'getWindowSize'));
0 commit comments