From 45c3717d230b3d13ebc389931d96e3ad8ea60dad Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 9 Jun 2021 09:44:06 +0800 Subject: [PATCH] =?UTF-8?q?BI-88256=20fix:=20nashorn=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E5=8F=AA=E5=AF=BC=E5=87=BA=E4=B8=80=E5=8D=8A=E7=9A=84=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multiselect/multiselect.loader.js | 5 ++++- src/widget/multiselect/multiselect.loader.nobar.js | 4 +++- .../multitextvalue.loader.search.js | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/widget/multiselect/multiselect.loader.js b/src/widget/multiselect/multiselect.loader.js index c084839764..fdfb2d1aa7 100644 --- a/src/widget/multiselect/multiselect.loader.js +++ b/src/widget/multiselect/multiselect.loader.js @@ -172,7 +172,10 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { }, populate: function (items) { - arguments[0] = this._createItems(items); + // arguments.length为0时对arguments[0]赋值后不同环境对其length的取值不同(nashorn) + if (BI.isNotNull(items)) { + arguments[0] = this._createItems(items); + } this.button_group.populate.apply(this.button_group, arguments); }, diff --git a/src/widget/multiselect/multiselect.loader.nobar.js b/src/widget/multiselect/multiselect.loader.nobar.js index 45b3b6d92c..8f469e62e4 100644 --- a/src/widget/multiselect/multiselect.loader.nobar.js +++ b/src/widget/multiselect/multiselect.loader.nobar.js @@ -161,7 +161,9 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, { }, populate: function (items) { - arguments[0] = this._createItems(items); + if (BI.isNotNull(items)) { + arguments[0] = this._createItems(items); + } this.button_group.populate.apply(this.button_group, arguments); }, diff --git a/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js b/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js index 8811e5aa7d..65cfeb2175 100644 --- a/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js +++ b/src/widget/searchmultitextvaluecombo/multitextvalue.loader.search.js @@ -158,7 +158,9 @@ BI.SearchMultiSelectLoader = BI.inherit(BI.Widget, { }, populate: function (items) { - arguments[0] = this._createItems(items); + if (BI.isNotNull(items)) { + arguments[0] = this._createItems(items); + } this.button_group.populate.apply(this.button_group, arguments); },