We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import enquirer from "enquirer"; const { Scale } = enquirer; const prompt = new Scale({ message: 'Test Scale', scale: [ { name: "1", message: "Option 1" }, { name: "2", message: "Option 2" }, { name: "3", message: "Option 3" }, ], choices: [ { name: 1, message: "Question 1", initial: 0 }, { name: 2, message: "Question 2", initial: 0 }, { name: 3, message: "Question 3", initial: 0 }, ] }); await prompt.run();
The text was updated successfully, but these errors were encountered:
This seems to be caused by this logic in scale.js, which defaults to 2 in case of a falsy initial value.
scale.js
2
Sorry, something went wrong.
fix enquirer#455: scale choice initial value bug
2e02e97
2a19e6d
cff2ba2
Successfully merging a pull request may close this issue.
Reproduction
Expected result
Actual result
The text was updated successfully, but these errors were encountered: