diff --git a/lib/readline-sync.js b/lib/readline-sync.js index 99bdb15..524308d 100644 --- a/lib/readline-sync.js +++ b/lib/readline-sync.js @@ -24,7 +24,7 @@ var function _readlineSync(display, options) { var input = '', rsize, err; - if (display !== '') { + if (display !== '') { // null and undefined were excluded. if (typeof print === 'function') { print(display, encoding); } stdout.write(display + '', encoding); } @@ -154,8 +154,10 @@ exports.setPrint = function(fnc) { print = fnc; }; exports.setPrompt = function(newPrompt) { /* jshint eqnull:true */ - promptText = newPrompt != null ? newPrompt : ''; + if (newPrompt != null) { /* jshint eqnull:false */ + promptText = newPrompt; + } return promptText; }; diff --git a/package.json b/package.json index 2f0d7e7..356ccde 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "readline-sync", "description": "Synchronous Readline", - "version": "0.4.4", + "version": "0.4.5", "homepage": "https://github.com/anseki/readline-sync", "author": { "name": "anseki"