diff --git a/src/typeahead/plugin.js b/src/typeahead/plugin.js index 1ec1d28..8d2f78b 100644 --- a/src/typeahead/plugin.js +++ b/src/typeahead/plugin.js @@ -55,7 +55,7 @@ }, val: function val(newVal) { - return newVal ? this.each(setQuery) : this.map(getQuery).get(); + return _.isString(newVal) ? this.each(setQuery) : this.map(getQuery).get(); function setQuery() { var $input = $(this), typeahead;