Skip to content

Commit

Permalink
fix enquirer#455: scale choice initial value bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gar-r committed Mar 13, 2024
1 parent 70bdb0f commit 2e02e97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prompts/scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LikertScale extends ArrayPrompt {

for (let ch of this.choices) {
longest = Math.max(longest, ch.message.length);
ch.scaleIndex = ch.initial || 2;
ch.scaleIndex = (typeof ch.initial !== 'undefined') ? ch.initial : 2;
ch.scale = [];

for (let i = 0; i < this.scale.length; i++) {
Expand Down

0 comments on commit 2e02e97

Please sign in to comment.