فهرست منبع

Fixes #1562; remove some dead code
No longer fire change event when .select2('data', falsyValue) is called without the 3rd param;
Dead code removed: !"" is true.

UltCombo 11 سال پیش
والد
کامیت
2d58f5b084
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      select2.js

+ 2 - 2
select2.js

@@ -2293,8 +2293,8 @@ the specific language governing permissions and limitations under the Apache Lic
                 if (data == undefined) data = null;
                 return data;
             } else {
-                if (!value || value === "") {
-                    this.clear(triggerChange);
+                if (!value) {
+                    this.clear(!!triggerChange);
                 } else {
                     data = this.data();
                     this.opts.element.val(!value ? "" : this.id(value));