From 2d58f5b084e358fe326198e111a64e99adf3da70 Mon Sep 17 00:00:00 2001 From: UltCombo Date: Tue, 23 Jul 2013 18:55:09 -0300 Subject: [PATCH] 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. --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 9207009c..cef3e134 100644 --- a/select2.js +++ b/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));