[v5] create-edge will report an error when listening to onCreate when creating an edge #6430
Labels
behavior
Issue about behaviors
bug 🐛
Something isn't working
need improvement
Lack of information or incorrect format
v5
waiting for author
Further information is requested from the author.
Describe the bug / 问题描述
{ type: 'create-edge', // trigger: 'click', enable: (event) => { console.log(event); return ['node'].includes(event.targetType); }, onCreate() { // isCreateEdgeRef.current = true; }, onFinish(e) {} }
报错信息如下:
data.ts:49 Uncaught (in promise) TypeError: Cannot destructure property 'data' of 'data' as it is undefined. at cloneElementData (data.ts:49:17) at DataController.pushChange (data.ts:83:34) at data.ts:349:14 at Array.map (<anonymous>) at DataController.addEdgeData (data.ts:348:13) at _Graph.addEdgeData (graph.ts:706:24) at _CreateEdge.createEdge (create-edge.ts:178:11) at _CreateEdge.<anonymous> (create-edge.ts:123:12) at Generator.next (<anonymous>) at collapse-expand.ts:64:26
Reproduction link / 重现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
No response
G6 Version / G6 版本
🆕 5.x
Operating System / 操作系统
Windows
Browser / 浏览器
Edge
Additional context / 补充说明
No response
The text was updated successfully, but these errors were encountered: