mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Fix error simple string
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user