diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-05 12:03:31 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-05 12:03:31 +0000 |
commit | a6e88a923c3844af6e59a18c9cb0a9dd998abf7b (patch) | |
tree | 1d71addcefceb9077c4622f290845705a88d5728 | |
parent | 790a23a56fa80e0ecd7cda689906b0da3e829036 (diff) | |
download | brdo-a6e88a923c3844af6e59a18c9cb0a9dd998abf7b.tar.gz brdo-a6e88a923c3844af6e59a18c9cb0a9dd998abf7b.tar.bz2 |
#159762 by paul.lovvik and jp.stacey: Fixed Autocomplete errors from whitespace entry.
-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; } |