Skip to content

Commit

Permalink
Fix #862 - Do not throw when returning undefined from filter functions
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Dec 15, 2019
1 parent af16d5b commit e2e07e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/inquirer/lib/prompts/input.js
Expand Up @@ -90,10 +90,10 @@ class InputPrompt extends Base {
this.done(state.value);
}

onError(state) {
this.rl.line += state.value;
this.rl.cursor += state.value.length;
this.render(state.isValid);
onError({ value = '', isValid }) {
this.rl.line += value;
this.rl.cursor += value.length;
this.render(isValid);
}

/**
Expand Down

0 comments on commit e2e07e3

Please sign in to comment.