From 924bcc734d562885084d9b909ed3bb5ad3fa8f1c Mon Sep 17 00:00:00 2001 From: guy <141592Wc> Date: Tue, 13 Jun 2017 19:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=8A=A0=E5=85=A5=E6=A8=AA?= =?UTF-8?q?=E5=90=91=E6=BB=9A=E5=8A=A8=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/widget.js | 6 ++++-- docs/widget.js | 6 ++++-- src/component/treevaluechooser/abstract.treevaluechooser.js | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) 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]; + } } } },