Skip to content

Commit

Permalink
compatibility fix #1042
Browse files Browse the repository at this point in the history
  • Loading branch information
SanariSan committed Sep 15, 2021
1 parent e97d4fe commit 2fb23d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/inquirer/lib/prompts/rawlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ class RawListPrompt extends Base {
if (index == null) {
index = this.rawDefault;
} else if (index === '') {
this.selected =
this.selected !== null && this.selected !== undefined ? this.selected : -1;
this.selected = this.selected === undefined ? -1 : this.selected;
index = this.selected;
} else {
index -= 1;
Expand Down

0 comments on commit 2fb23d6

Please sign in to comment.