You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inquirer.prompt([{type: "list",name: "action",message: "Choose action",choices: ["Sign in","Sign up"]},{type: "input",name: "username",message: "Enter username",validate(username,{ action }){returnnewPromise(res=>{// Check if user exists in a database and resolve the answer.});}}]).then(answers=>{// Make some queries to the database.inquirer.prompt({type: "list",name: "roomAction",message: "No rooms found",choices: ["Create room","Join room"]});});
Produces:
? Choose action: Sign in
? Enter username: Someusername
(and it gets stuck here)
The same happens when the promise is resolved after a timeout, but it doesn't when the promise is instantly resolved.
The text was updated successfully, but these errors were encountered:
@wszydlak thanks! I tried it in bash and it's worked. I spent more time with this problem and i also notice that it's only stuck when async validation is on the last question.
Produces:
The same happens when the promise is resolved after a timeout, but it doesn't when the promise is instantly resolved.
The text was updated successfully, but these errors were encountered: