crubier / react-graph-vis

A react component to render nice graphs using vis.js
http://crubier.github.io/react-graph-vis/
MIT License
946 stars 170 forks source link

Error 'Uncaught TypeError: Array or DataSet expected' when updating from v1.0.5 to v1.0.7 #111

Open Cray-code opened 3 years ago

Cray-code commented 3 years ago

After updating from v1.0.5 to v1.0.7 throws error, even if I pass the same properties as in the Demo :


    at t.value (vis-network.esm.min.js:26)
    at hC../node_modules/vis-network/dist/vis-network.esm.min.js.hC.setData (vis-network.esm.min.js:26)
    at new hC (vis-network.esm.min.js:26)
    at Graph.updateGraph (index.js:206)
    at Graph.componentDidMount (index.js:70)
    at commitLifeCycles (react-dom.development.js:19814)
    at commitLayoutEffects (react-dom.development.js:22803)
    at HTMLUnknownElement.callCallback (react-dom.development.js:188)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:237)
    at invokeGuardedCallback (react-dom.development.js:292)
value @ vis-network.esm.min.js:26
./node_modules/vis-network/dist/vis-network.esm.min.js.hC.setData @ vis-network.esm.min.js:26
hC @ vis-network.esm.min.js:26
updateGraph @ index.js:206
componentDidMount @ index.js:70
commitLifeCycles @ react-dom.development.js:19814
commitLayoutEffects @ react-dom.development.js:22803
callCallback @ react-dom.development.js:188
invokeGuardedCallbackDev @ react-dom.development.js:237
invokeGuardedCallback @ react-dom.development.js:292
commitRootImpl @ react-dom.development.js:22541
unstable_runWithPriority @ scheduler.development.js:653
runWithPriority$1 @ react-dom.development.js:11039
commitRoot @ react-dom.development.js:22381
finishSyncRender @ react-dom.development.js:21807
performSyncWorkOnRoot @ react-dom.development.js:21793
scheduleUpdateOnFiber @ react-dom.development.js:21188
updateContainer @ react-dom.development.js:24373
(anonymous) @ react-dom.development.js:24758
unbatchedUpdates @ react-dom.development.js:21903
legacyRenderSubtreeIntoContainer @ react-dom.development.js:24757
render @ react-dom.development.js:24840
./src/index.js @ index.js:15
__webpack_require__ @ bootstrap:19
0 @ index.js:137378
__webpack_require__ @ bootstrap:19
(anonymous) @ bootstrap:83
(anonymous) @ bootstrap:83
react-dom.development.js:19527 The above error occurred in the <Graph> component:
    in Graph (created by NotesMindMapComponent)
    in div (created by Context.Consumer)
    in StyledComponent (created by styled.div)
    in styled.div (created by NotesMindMapComponent)
    in NotesMindMapComponent (created by ConnectFunction)
    in ConnectFunction (created by NotesPageComponent)
    in NotesPageComponent (created by App)
    in Route (created by App)
    in Switch (created by App)
    in ThemeProvider (created by App)
    in App
    in Router (created by ConnectedRouter)
    in ConnectedRouter (created by Context.Consumer)
    in ConnectedRouterWithContext (created by ConnectFunction)
    in ConnectFunction
    in Provider
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries.```