Skip to content

Commit

Permalink
Revert breaking change. (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Apr 5, 2020
1 parent ef8c7a9 commit 9172ff0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,15 @@ function TestAdapter(answers) {
}, this);
}

TestAdapter.prototype.prompt = function(questions, prefilledAnswers) {
return this.promptModule(questions, prefilledAnswers);
TestAdapter.prototype.prompt = function(questions, prefilledAnswers, cb) {
if (typeof prefilledAnswers === 'function') {
cb = prefilledAnswers;
prefilledAnswers = undefined;
}

var promise = this.promptModule(questions, prefilledAnswers);
promise.then(cb || _.noop);
return promise;
};

module.exports = {
Expand Down

0 comments on commit 9172ff0

Please sign in to comment.