Merge pull request #831 from zhengbigbig/master

getModel is undefined
This commit is contained in:
Moyee 2019-09-09 09:36:55 +08:00 committed by GitHub
commit 2239303b4f

View File

@ -115,8 +115,8 @@ class TreeGraph extends Graph {
*/
updateChild(data, parent) {
const self = this;
// 如果没有父节点是全量的更新直接重置data
if (!parent) {
// 如果没有父节点或找不到该节点是全量的更新直接重置data
if (!parent || !self.findById(parent)) {
self.changeData(data);
return;
}