Skip to content

Commit 5d47d7e

Browse files
authored
fix of #1042 rawlist throw (#1045)
Co-authored-by: SanariSan <SanariSan@users.noreply.github.com>
1 parent 8e0b3d4 commit 5d47d7e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/inquirer/lib/prompts/rawlist.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ class RawListPrompt extends Base {
123123
if (index == null) {
124124
index = this.rawDefault;
125125
} else if (index === '') {
126+
this.selected = this.selected ?? -1;
126127
index = this.selected;
127128
} else {
128129
index -= 1;

0 commit comments

Comments
 (0)