From cd0adbe913413afd7070e5515f12e47ceae7419c Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Wed, 20 Feb 2013 19:05:54 -0800 Subject: [PATCH] fix duplicate values in IE. fix #840 --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 1930377a..4a4b3879 100644 --- a/select2.js +++ b/select2.js @@ -118,8 +118,8 @@ the specific language governing permissions and limitations under the Apache Lic if (a === b) return true; if (a === undefined || b === undefined) return false; if (a === null || b === null) return false; - if (a.constructor === String) return a === b+''; - if (b.constructor === String) return b === a+''; + if (a.constructor === String) return a+'' === b+''; // IE requires a+'' instead of just a + if (b.constructor === String) return b+'' === a+''; // IE requires b+'' instead of just b return false; }