Skip to content

Commit 49efa48

Browse files
committed
Fix: Cannot read properties of null for setRawMode
1 parent 59db172 commit 49efa48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/tty.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ObjectSetPrototypeOf(ReadStream, net.Socket);
7272

7373
ReadStream.prototype.setRawMode = function(flag) {
7474
flag = !!flag;
75-
const err = this._handle.setRawMode(flag);
75+
const err = this._handle && this._handle.setRawMode(flag);
7676
if (err) {
7777
this.emit('error', errors.errnoException(err, 'setRawMode'));
7878
return this;

0 commit comments

Comments
 (0)