| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 93ee36e commit a033dff
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,6 @@ | |||
| 22 | 22 | 'use strict'; | |
| 23 | 23 | ||
| 24 | 24 | const { | |
| 25 | - Array, | ||
| 26 | 25 | NumberIsInteger, | |
| 27 | 26 | ObjectSetPrototypeOf, | |
| 28 | 27 | } = primordials; | |
@@ -106,7 +105,7 @@ function WriteStream(fd) { | |||
| 106 | 105 | // Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671 | |
| 107 | 106 | this._handle.setBlocking(true); | |
| 108 | 107 | ||
| 109 | - const winSize = new Array(2); | ||
| 108 | + const winSize = [0, 0]; | ||
| 110 | 109 | const err = this._handle.getWindowSize(winSize); | |
| 111 | 110 | if (!err) { | |
| 112 | 111 | this.columns = winSize[0]; | |
@@ -126,7 +125,7 @@ WriteStream.prototype.hasColors = hasColors; | |||
| 126 | 125 | WriteStream.prototype._refreshSize = function() { | |
| 127 | 126 | const oldCols = this.columns; | |
| 128 | 127 | const oldRows = this.rows; | |
| 129 | - const winSize = new Array(2); | ||
| 128 | + const winSize = [0, 0]; | ||
| 130 | 129 | const err = this._handle.getWindowSize(winSize); | |
| 131 | 130 | if (err) { | |
| 132 | 131 | this.emit('error', new errors.ErrnoException(err, 'getWindowSize')); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments