Fix error simple string

pull/3849/head
shamoon 3 months ago
parent 2aa7a3898b
commit 0dc2f2e18a

@ -12,6 +12,10 @@ function displayData(data) {
export default function Error({ error }) { export default function Error({ error }) {
const { t } = useTranslation(); const { t } = useTranslation();
if (typeof error === "string") {
error = { message: error }; // eslint-disable-line no-param-reassign
}
if (error?.data?.error) { if (error?.data?.error) {
error = error.data.error; // eslint-disable-line no-param-reassign error = error.data.error; // eslint-disable-line no-param-reassign
} }

Loading…
Cancel
Save