2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-10 07:11:02 +00:00

fix getQuery return empty string:

when I input Chinese,the delimiter will equal value, and function getQuery  return an empty string;
This commit is contained in:
yuzhigang 2016-12-22 17:00:45 +08:00
parent 5f00f638f0
commit 094bb1b7fb

View File

@ -508,6 +508,11 @@
if (!delimiter) { if (!delimiter) {
return value; return value;
} }
if( delimiter == value ){
return $.trim(value)
}
parts = value.split(delimiter); parts = value.split(delimiter);
return $.trim(parts[parts.length - 1]); return $.trim(parts[parts.length - 1]);
}, },