mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 14:18:47 +00:00
Fix error simple string
This commit is contained in:
parent
2aa7a3898b
commit
0dc2f2e18a
1 changed files with 4 additions and 0 deletions
|
@ -12,6 +12,10 @@ function displayData(data) {
|
|||
export default function Error({ error }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (typeof error === "string") {
|
||||
error = { message: error }; // eslint-disable-line no-param-reassign
|
||||
}
|
||||
|
||||
if (error?.data?.error) {
|
||||
error = error.data.error; // eslint-disable-line no-param-reassign
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue