Skip to content

Commit 8648ee8

Browse files
authored
compatibility fix #1042 (#1048)
Co-authored-by: SanariSan <SanariSan@users.noreply.github.com>
1 parent 47dfcaf commit 8648ee8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/inquirer/lib/prompts/rawlist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class RawListPrompt extends Base {
123123
if (index == null) {
124124
index = this.rawDefault;
125125
} else if (index === '') {
126-
this.selected = this.selected ?? -1;
126+
this.selected = this.selected === undefined ? -1 : this.selected;
127127
index = this.selected;
128128
} else {
129129
index -= 1;

0 commit comments

Comments
 (0)