Merge pull request #3970 from phyzical/feature/prompt-error-support

FIX: Prompt Add user friendly message to avoid throwing recovery screen for invalid choices
This commit is contained in:
hydroflame 2022-08-09 12:02:40 -03:00 committed by GitHub
commit b19f6c5f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -139,6 +139,10 @@ function PromptMenuSelect({ prompt, resolve }: IContentProps): React.ReactElemen
return content;
};
if (!Array.isArray(prompt?.options?.choices)) {
return <Typography>Error: Please provide an array of string choices</Typography>;
}
return (
<>
<div style={{ display: "flex", alignItems: "center", paddingTop: "10px" }}>