You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The icon node is SVG, but doesn't have a name attribute.
To Reproduce
Configure a graph with a viewGenerator like this, where AlertIcon is imported from mdi-react
viewGenerator: (node) => (<AlertIcon/>),
Click a few nodes on the graph (might take a few clicks for some reason)
Observe error:
Graph.js:442 Uncaught TypeError: Cannot read property 'value' of undefined
at Graph._this.onClickGraph (Graph.js:442)
at HTMLUnknownElement.callCallback (react-dom.development.js:147)
at Object.invokeGuardedCallbackDev (react-dom.development.js:196)
at invokeGuardedCallback (react-dom.development.js:250)
at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:265)
at executeDispatch (react-dom.development.js:571)
...
Expected behavior
The onClickNode handler should be called
Hi @zerans thanks for reporting, will look into it asap, in the meantime if anyone wants to take a look at it It just a matter of making sure that this e.target.attributes.name.value is accessible by checking for the existence of the property.
Describe the bug
When using an icon from
mdi-react
in a node, clicking the node throws an error.Looks like the offending code is here:
The icon node is SVG, but doesn't have a
name
attribute.To Reproduce
viewGenerator
like this, whereAlertIcon
is imported frommdi-react
Click a few nodes on the graph (might take a few clicks for some reason)
Observe error:
Expected behavior
The
onClickNode
handler should be calledEnvironment:
The text was updated successfully, but these errors were encountered: