Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-12-18 21:58:49 +0300
committerRuben Bridgewater <ruben@bridgewater.de>2019-12-25 13:17:31 +0300
commitb45eeee01741013c4a37887817c71b779d9edb12 (patch)
treedcfe7421be9f9e98513167d08f91737b2542afba /lib
parentb768e84794604b2a7d7e004e6fe838145b80098c (diff)
readline: set null as callback return in case there's no error
The cursor move functions accept a callback. It was possible that `undefined` was returned in case there was no error instead of null. PR-URL: https://github.com/nodejs/node/pull/31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/readline.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/readline.js b/lib/readline.js
index d5740942002..255fbe8754a 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -1200,7 +1200,7 @@ function cursorTo(stream, x, y, callback) {
if (stream == null || (typeof x !== 'number' && typeof y !== 'number')) {
if (typeof callback === 'function')
- process.nextTick(callback);
+ process.nextTick(callback, null);
return true;
}
@@ -1221,7 +1221,7 @@ function moveCursor(stream, dx, dy, callback) {
if (stream == null || !(dx || dy)) {
if (typeof callback === 'function')
- process.nextTick(callback);
+ process.nextTick(callback, null);
return true;
}
@@ -1255,7 +1255,7 @@ function clearLine(stream, dir, callback) {
if (stream === null || stream === undefined) {
if (typeof callback === 'function')
- process.nextTick(callback);
+ process.nextTick(callback, null);
return true;
}
@@ -1277,7 +1277,7 @@ function clearScreenDown(stream, callback) {
if (stream === null || stream === undefined) {
if (typeof callback === 'function')
- process.nextTick(callback);
+ process.nextTick(callback, null);
return true;
}