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:
Agent Zero
2026-08-21 11:36:55 +02:00
parent 6555655ecf
commit e9b8936091
33 changed files with 37 additions and 37 deletions
+1 -1
View File
@@ -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>