Skip to content

Commit cd0adbe

Browse files
committed
fix duplicate values in IE. fix select2#840
1 parent 8e9e65f commit cd0adbe

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
@@ -118,8 +118,8 @@ the specific language governing permissions and limitations under the Apache Lic
118118
if (a === b) return true;
119119
if (a === undefined || b === undefined) return false;
120120
if (a === null || b === null) return false;
121-
if (a.constructor === String) return a === b+'';
122-
if (b.constructor === String) return b === a+'';
121+
if (a.constructor === String) return a+'' === b+''; // IE requires a+'' instead of just a
122+
if (b.constructor === String) return b+'' === a+''; // IE requires b+'' instead of just b
123123
return false;
124124
}
125125

0 commit comments

Comments
 (0)