Skip to content

Commit f64df14

Browse files
committed
fix: refresh should take both node and link data
1 parent 5705b80 commit f64df14

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/interact.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,8 @@ export const expandNode = function(el, isExpand) {
333333
export const refresh = function(data) {
334334
// add parent property to every node
335335
if (data) {
336-
this.nodeData = data
336+
this.nodeData = data.nodeData
337+
this.linkData = data.linkData || {}
337338
}
338339
this.addParentLink(this.nodeData)
339340
// create dom element for every node

0 commit comments

Comments
 (0)