Update select2.js to use String.prototype.trim instead of jQuery.trim
This commit is contained in:
parent
8026131767
commit
6f1a1b2492
|
@ -3707,7 +3707,7 @@ S2.define('select2/data/tags',[
|
||||||
};
|
};
|
||||||
|
|
||||||
Tags.prototype.createTag = function (decorated, params) {
|
Tags.prototype.createTag = function (decorated, params) {
|
||||||
var term = $.trim(params.term);
|
var term = params.term.trim();
|
||||||
|
|
||||||
if (term === '') {
|
if (term === '') {
|
||||||
return null;
|
return null;
|
||||||
|
@ -4941,7 +4941,7 @@ S2.define('select2/defaults',[
|
||||||
|
|
||||||
function matcher (params, data) {
|
function matcher (params, data) {
|
||||||
// Always return the object if there is nothing to compare
|
// Always return the object if there is nothing to compare
|
||||||
if ($.trim(params.term) === '') {
|
if ( params.term.trim() === '' ) {
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue