瀏覽代碼

fix duplicate values in IE. fix #840

Igor Vaynberg 12 年之前
父節點
當前提交
cd0adbe913
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      select2.js

+ 2 - 2
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;
     }