-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
readline: fix to not access a property on an undefined value
PR-URL: #43543 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
|
||
require('../common'); | ||
const ArrayStream = require('../common/arraystream'); | ||
const repl = require('repl'); | ||
|
||
const stream = new ArrayStream(); | ||
const replServer = repl.start({ | ||
input: stream, | ||
output: stream, | ||
terminal: true, | ||
}); | ||
|
||
// Editor mode | ||
replServer.write('.editor\n'); | ||
|
||
// Regression test for https://github.com/nodejs/node/issues/43528 | ||
replServer.write('a'); | ||
replServer.write(null, { name: 'tab' }); // Should not throw | ||
|
||
replServer.close(); |