Skip to content

Commit 664417e

Browse files
committed
Improve error handling
1 parent bdea9db commit 664417e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/ra-core/src/controller/button/useBulkUpdateController.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,14 @@ export const useBulkUpdateController = <
5353
notify(
5454
typeof error === 'string'
5555
? error
56-
: error.message || 'ra.notification.http_error',
56+
: error?.message || 'ra.notification.http_error',
5757
{
5858
type: 'error',
5959
messageArgs: {
6060
_:
6161
typeof error === 'string'
6262
? error
63-
: error && error.message
64-
? error.message
65-
: undefined,
63+
: error?.message,
6664
},
6765
}
6866
);

0 commit comments

Comments
 (0)