Skip to content

Commit 2d58f5b

Browse files
author
UltCombo
committed
Fixes select2#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.
1 parent 001c9ab commit 2d58f5b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

select2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,8 +2293,8 @@ the specific language governing permissions and limitations under the Apache Lic
22932293
if (data == undefined) data = null;
22942294
return data;
22952295
} else {
2296-
if (!value || value === "") {
2297-
this.clear(triggerChange);
2296+
if (!value) {
2297+
this.clear(!!triggerChange);
22982298
} else {
22992299
data = this.data();
23002300
this.opts.element.val(!value ? "" : this.id(value));

0 commit comments

Comments
 (0)