Skip to content

Commit

Permalink
Fixes select2#3882 - cannot deselect items in grouped multiple select…
Browse files Browse the repository at this point in the history
… when data ids are not strings
  • Loading branch information
jivings committed Oct 29, 2015
1 parent 6be96cf commit 065a33f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/js/select2/data/select.js
Expand Up @@ -88,7 +88,8 @@ define([
var val = [];

for (var d = 0; d < currentData.length; d++) {
var id = currentData[d].id;
// Make sure to always be comparing strings
var id = currentData[d].id + '';

if (id !== data.id && $.inArray(id, val) === -1) {
val.push(id);
Expand Down

0 comments on commit 065a33f

Please sign in to comment.