Skip to content

Commit

Permalink
Ensure data.id is a String in SelectAdapter select/unselect
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrowning committed Oct 15, 2018
1 parent 14a059d commit be9c948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/select2/data/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ define([
for (var d = 0; d < currentData.length; d++) {
var id = currentData[d].id;

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

0 comments on commit be9c948

Please sign in to comment.