Skip to content
Snippets Groups Projects
Commit a6e88a92 authored by Angie Byron's avatar Angie Byron
Browse files

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

parent 790a23a5
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment