diff options
-rw-r--r-- | misc/autocomplete.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/autocomplete.js b/misc/autocomplete.js index 489e2fb1b..8c839c7c3 100644 --- a/misc/autocomplete.js +++ b/misc/autocomplete.js @@ -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; } |