Commit a6e88a92 authored by webchick's avatar webchick
Browse files

#159762 by paul.lovvik and jp.stacey: Fixed Autocomplete errors from whitespace entry.

parent 790a23a5
......@@ -256,7 +256,8 @@ Drupal.ACDB.prototype.search = function (searchString) {
// See if this string needs to be searched for anyway.
searchString = searchString.replace(/^\s+|\s+$/, '');
if (searchString.charAt(searchString.length - 1) == ',') {
if (searchString.length <= 0 ||
searchString.charAt(searchString.length - 1) == ',') {
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment