Add auser friendly message to avoid throwing recovery screen

feature/prompt-error-support

File List:
src/ui/React/PromptManager.tsx
This commit is contained in:
phyzical 2022-08-09 15:57:36 +08:00
parent 39cf0cb57f
commit 3465f12f1d
No known key found for this signature in database
GPG Key ID: 91E97494BCA22BCF

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