Skip to content

Commit f8dda91

Browse files
committed
Merge pull request select2#1014 from sjschukin/patch-1
.select2("data", null) causes an error
2 parents aa0fb73 + 1cff8d4 commit f8dda91

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3233,7 +3233,7 @@ the specific language governing permissions and limitations under the Apache Lic
32333233
minimumInputLength: 0,
32343234
maximumInputLength: null,
32353235
maximumSelectionSize: 0,
3236-
id: function (e) { return e.id; },
3236+
id: function (e) { return e == undefined ? null : e.id; },
32373237
matcher: function(term, text) {
32383238
return stripDiacritics(''+text).toUpperCase().indexOf(stripDiacritics(''+term).toUpperCase()) >= 0;
32393239
},

0 commit comments

Comments
 (0)