Skip to content

Commit 1cff8d4

Browse files
committed
Update select2.js
bugfix: .select2("data", null) for remote datasource causes an error "ReferenceError: e is not defined"
1 parent 89bb328 commit 1cff8d4

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
@@ -2701,7 +2701,7 @@ the specific language governing permissions and limitations under the Apache Lic
27012701
minimumInputLength: 0,
27022702
maximumInputLength: null,
27032703
maximumSelectionSize: 0,
2704-
id: function (e) { return e.id; },
2704+
id: function (e) { return e == undefined ? null : e.id; },
27052705
matcher: function(term, text) {
27062706
return (''+text).toUpperCase().indexOf((''+term).toUpperCase()) >= 0;
27072707
},

0 commit comments

Comments
 (0)