diff --git a/bi/widget.js b/bi/widget.js index 7e8266319e..f3b230dd3b 100644 --- a/bi/widget.js +++ b/bi/widget.js @@ -17790,14 +17790,16 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree var name = values[values.length - 1]; var p = values.slice(0, values.length - 1); var pNode = this._getNode(selectedValues, p); - if (pNode[name]) { + if (pNode != null && pNode[name]) { delete pNode[name]; //递归删掉空父节点 while (p.length > 0 && BI.isEmpty(pNode)) { name = p[p.length - 1]; p = p.slice(0, p.length - 1); pNode = this._getNode(selectedValues, p); - delete pNode[name]; + if (pNode != null) { + delete pNode[name]; + } } } }, diff --git a/docs/widget.js b/docs/widget.js index 7e8266319e..f3b230dd3b 100644 --- a/docs/widget.js +++ b/docs/widget.js @@ -17790,14 +17790,16 @@ BI.shortcut('bi.all_value_chooser_pane', BI.AllValueChooserPane);BI.AbstractTree var name = values[values.length - 1]; var p = values.slice(0, values.length - 1); var pNode = this._getNode(selectedValues, p); - if (pNode[name]) { + if (pNode != null && pNode[name]) { delete pNode[name]; //递归删掉空父节点 while (p.length > 0 && BI.isEmpty(pNode)) { name = p[p.length - 1]; p = p.slice(0, p.length - 1); pNode = this._getNode(selectedValues, p); - delete pNode[name]; + if (pNode != null) { + delete pNode[name]; + } } } }, diff --git a/src/component/treevaluechooser/abstract.treevaluechooser.js b/src/component/treevaluechooser/abstract.treevaluechooser.js index e32b1fdd14..14a083f150 100644 --- a/src/component/treevaluechooser/abstract.treevaluechooser.js +++ b/src/component/treevaluechooser/abstract.treevaluechooser.js @@ -551,14 +551,16 @@ BI.AbstractTreeValueChooser = BI.inherit(BI.Widget, { var name = values[values.length - 1]; var p = values.slice(0, values.length - 1); var pNode = this._getNode(selectedValues, p); - if (pNode[name]) { + if (pNode != null && pNode[name]) { delete pNode[name]; //递归删掉空父节点 while (p.length > 0 && BI.isEmpty(pNode)) { name = p[p.length - 1]; p = p.slice(0, p.length - 1); pNode = this._getNode(selectedValues, p); - delete pNode[name]; + if (pNode != null) { + delete pNode[name]; + } } } },