react-admin icon indicating copy to clipboard operation
react-admin copied to clipboard

"Cannot use 'in' operator to search for 'id' in undefined" error when delete a record

Open Dr8g0n opened this issue 9 years ago • 2 comments

Record is deleted with this error "Cannot use 'in' operator to search for 'id' in undefined" shows in notification

Environment

  • Admin-on-rest version: 1.3.1
  • React version: 15.6.2
  • Stack trace (in case of a JS error): Cannot use 'in' operator to search for 'id' in undefined (anonymous) @ crudResponse.js:147 r @ runtime.js:65 (anonymous) @ runtime.js:303 e.(anonymous function) @ runtime.js:117 b @ proc.js:302 u @ proc.js:261 O @ proc.js:544 E @ proc.js:425 b @ proc.js:306 r @ proc.js:378 u @ proc.js:456 t @ channel.js:73 (anonymous) @ channel.js:161 (anonymous) @ channel.js:182 t @ channel.js:26 (anonymous) @ middleware.js:67 dispatch @ applyMiddleware.js:35 (anonymous) @ utils.js:250 (anonymous) @ proc.js:479 r @ scheduler.js:19 u @ scheduler.js:60 o @ scheduler.js:33 T @ proc.js:476 E @ proc.js:425 b @ proc.js:306 r @ proc.js:378 (anonymous) @ proc.js:441

Dr8g0n avatar Oct 06 '17 19:10 Dr8g0n

How are you referencing admin-on-rest on your project ? It looks like a failed transpilation error to me

djhi avatar Oct 11 '17 08:10 djhi

const App = () => (
    <Admin loginPage={Login} authClient={authClient} theme={getMuiTheme(myTheme)} title="App Admin" dashboard={Dashboard} restClient={appApiRestClient} customRoutes={customRoutes} >
         <Resource name="users" list={UserList} edit={UserEdit} create={UserCreate} remove={Delete} icon={UserIcon} />
    </Admin>
);

export default App;

Dr8g0n avatar Nov 03 '17 23:11 Dr8g0n