React-diagrams: Treeview - Uncaught TypeError: Cannot read property 'children' of undefined

Created on 7 Aug 2020  路  4Comments  路  Source: projectstorm/react-diagrams

Recently, I encountered this error after a fresh yarn install which replaced earlier yarn.lock file with new one in which the material-UI seems to have upgraded a lot of its internal dependencies (I am using "@material-ui/core": "^4.8.3", "@material-ui/icons": "^4.5.1", "@material-ui/lab": "^4.0.0-alpha.39",). It works fine with my earlier yarn.lock file, but I am not able to install anything new because of this.

The error:

TreeView.js:590 Uncaught TypeError: Cannot read property 'children' of undefined at buildVisible (TreeView.js:590) at TreeView.js:601 at commitHookEffectListMount (react-dom.development.js:19607) at commitPassiveHookEffects (react-dom.development.js:19644) at HTMLUnknownElement.callCallback (react-dom.development.js:189) at Object.invokeGuardedCallbackDev (react-dom.development.js:238) at invokeGuardedCallback (react-dom.development.js:291) at flushPassiveEffectsImpl (react-dom.development.js:22708) at unstable_runWithPriority (scheduler.development.js:656) at runWithPriority$1 (react-dom.development.js:11076) at flushPassiveEffects (react-dom.development.js:22676) at performSyncWorkOnRoot (react-dom.development.js:21591) at react-dom.development.js:11130 at unstable_runWithPriority (scheduler.development.js:656) at runWithPriority$1 (react-dom.development.js:11076) at flushSyncCallbackQueueImpl (react-dom.development.js:11125) at workLoop (scheduler.development.js:600) at flushWork (scheduler.development.js:556) at MessagePort.performWorkUntilDeadline (scheduler.development.js:160)

Screenshot 2020-08-07 at 11 57 29 AM

bug needs investigation

All 4 comments

I am having the same behaviour when filtering the list of data passed to the tree view component externally. It is intermittently throwing this error and white screening the app. Did you find a solution to this?

I have bumped all the dependencies but still need to do a release, which might solve this issue

Hello, I'm having exactly the same problem in my project (not react-diagrams). The part of the tree that is updated with redux store works perfectly but not the one that is generated inside my component. Is there any trick I can do to solve this issue in my code? Any help would be appreciated

Hello, I'm having exactly the same problem in my project (not react-diagrams). The part of the tree that is updated with redux store works perfectly but not the one that is generated inside my component. Is there any trick I can do to solve this issue in my code? Any help would be appreciated

Sorry, I know this is not the right place to write this. I wnat just to help someone with this issue. It is related with the nodeId prop, they must be consecutive.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shortwavedave picture shortwavedave  路  3Comments

schecter22107 picture schecter22107  路  3Comments

msaglietto picture msaglietto  路  3Comments

M2Costa picture M2Costa  路  3Comments

jardg picture jardg  路  3Comments