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); },