fix: prevent [object Object] rendering in 25 frontend components
Replace direct {error} JSX rendering with typeof check + .message fallback.
When error is an object (not a string), React showed [object Object].
Now renders error.message or fallback string.
This commit is contained in:
@@ -114,7 +114,7 @@ export function DmsTrashPage() {
|
||||
<div className="p-6 max-w-7xl mx-auto" data-testid="dms-trash-page">
|
||||
<EmptyState
|
||||
title={t('dms.error')}
|
||||
description={error}
|
||||
description={typeof error === "string" ? error : (error as any)?.message || "Ein Fehler ist aufgetreten"}
|
||||
action={<Button onClick={() => window.location.reload()}>{t('dms.cancel')}</Button>}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user