diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js
index f64fcca01e41e0beaf50f132dfc382d773332aa5..1205a99caf1f1cbe08da2db6d809065e90872718 100644
--- a/js/bootstrap-typeahead.js
+++ b/js/bootstrap-typeahead.js
@@ -79,7 +79,7 @@
 
       q = this.query.toLowerCase()
 
-      items = this.data.filter(function (item) {
+      items = jQuery.grep(this.data, function (item) {
         if (that.matcher(item, q)) return item
       })
 
@@ -249,4 +249,4 @@
     })
   })
 
-}( window.jQuery )
\ No newline at end of file
+}( window.jQuery )