Index: misc/autocomplete.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/autocomplete.js,v
retrieving revision 1.17
diff -u -F^f -r1.17 autocomplete.js
--- misc/autocomplete.js	9 Jan 2007 07:31:04 -0000	1.17
+++ misc/autocomplete.js	13 Sep 2007 14:09:05 -0000
@@ -202,14 +202,16 @@
   var ul = document.createElement('ul');
   var ac = this;
   for (key in matches) {
-    var li = document.createElement('li');
-    $(li)
-      .html('<div>'+ matches[key] +'</div>')
-      .mousedown(function () { ac.select(this); })
-      .mouseover(function () { ac.highlight(this); })
-      .mouseout(function () { ac.unhighlight(this); });
-    li.autocompleteValue = key;
-    $(ul).append(li);
+    if (typeof(matches[key]) == 'string') {
+      var li = document.createElement('li');
+      $(li)
+        .html('<div>'+ matches[key] +'</div>')
+        .mousedown(function () { ac.select(this); })
+        .mouseover(function () { ac.highlight(this); })
+        .mouseout(function () { ac.unhighlight(this); });
+      li.autocompleteValue = key;
+      $(ul).append(li);
+    }
   }
 
   // Show popup with matches, if any
