summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-05 12:03:31 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-09-05 12:03:31 +0000
commita6e88a923c3844af6e59a18c9cb0a9dd998abf7b (patch)
tree1d71addcefceb9077c4622f290845705a88d5728 /misc
parent790a23a56fa80e0ecd7cda689906b0da3e829036 (diff)
downloadbrdo-a6e88a923c3844af6e59a18c9cb0a9dd998abf7b.tar.gz
brdo-a6e88a923c3844af6e59a18c9cb0a9dd998abf7b.tar.bz2
#159762 by paul.lovvik and jp.stacey: Fixed Autocomplete errors from whitespace entry.
Diffstat (limited to 'misc')
-rw-r--r--misc/autocomplete.js3
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;
}