Unverified Commit 8b6fd438 authored by Anna Henningsen's avatar Anna Henningsen
Browse files

repl: make `key` of `repl.write()` optional always

In `.editor` mode, `repl.write()` would have crashed when the
`key` argument was not present, because the overwritten
`_ttyWrite` of REPLs doesn’t check for the absence of a second
argument like `readline.write()` does.

Since the docs indicate that the argument is optional, add
a check paralleling the one in `readline.write()`.

PR-URL: https://github.com/nodejs/node/pull/9207


Reviewed-By: default avatarPrince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent d0d4ca5e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment