Skip to content

Commit

Permalink
compatibility fix #1042 (#1048)
Browse files Browse the repository at this point in the history
Co-authored-by: SanariSan <SanariSan@users.noreply.github.com>
  • Loading branch information
SanariSan and SanariSan committed Sep 15, 2021
1 parent 47dfcaf commit 8648ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/inquirer/lib/prompts/rawlist.js
Expand Up @@ -123,7 +123,7 @@ class RawListPrompt extends Base {
if (index == null) {
index = this.rawDefault;
} else if (index === '') {
this.selected = this.selected ?? -1;
this.selected = this.selected === undefined ? -1 : this.selected;
index = this.selected;
} else {
index -= 1;
Expand Down

0 comments on commit 8648ee8

Please sign in to comment.