summaryrefslogtreecommitdiff
path: root/misc/autocomplete.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/autocomplete.js')
-rw-r--r--misc/autocomplete.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/misc/autocomplete.js b/misc/autocomplete.js
index b0c454c77..166192891 100644
--- a/misc/autocomplete.js
+++ b/misc/autocomplete.js
@@ -213,12 +213,14 @@ Drupal.jsAC.prototype.found = function (matches) {
}
// Show popup with matches, if any
- if (ul.childNodes.length > 0) {
- $(this.popup).empty().append(ul).show();
- }
- else {
- $(this.popup).css({visibility: 'hidden'});
- this.hidePopup();
+ if (this.popup) {
+ if (ul.childNodes.length > 0) {
+ $(this.popup).empty().append(ul).show();
+ }
+ else {
+ $(this.popup).css({visibility: 'hidden'});
+ this.hidePopup();
+ }
}
}