File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
packages/ra-core/src/controller/button Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -53,16 +53,14 @@ export const useBulkDeleteController = <
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 ) ;
Original file line number Diff line number Diff line change @@ -97,21 +97,18 @@ export const useDeleteController = <
9797 record && unselect ( [ record . id ] ) ;
9898 redirect ( redirectTo , resource ) ;
9999 } ,
100- onError : error => {
100+ onError : ( error : any ) => {
101101 notify (
102102 typeof error === 'string'
103103 ? error
104- : ( error as Error ) ?. message ||
105- 'ra.notification.http_error' ,
104+ : error ?. message || 'ra.notification.http_error' ,
106105 {
107106 type : 'error' ,
108107 messageArgs : {
109108 _ :
110109 typeof error === 'string'
111110 ? error
112- : ( error as Error ) ?. message
113- ? ( error as Error ) . message
114- : undefined ,
111+ : error ?. message ,
115112 } ,
116113 }
117114 ) ;
You can’t perform that action at this time.
0 commit comments