From 4eb79fc715f996648890d8e1741c164317f3fe47 Mon Sep 17 00:00:00 2001 From: Ryan Findley Date: Thu, 4 Aug 2011 13:11:04 -0300 Subject: [PATCH] Differentiate between a minCharacters of 0 and undefined. The comment at line 65 implies that setting minCharacters to 0 will result in no matches being displayed when there are no characters in the search box (e.g. if you've backspaced your search term). The code was treating 'undefined' and 0 identically. --- jquery.ui.autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.ui.autocomplete.js b/jquery.ui.autocomplete.js index ac16744..1a57318 100644 --- a/jquery.ui.autocomplete.js +++ b/jquery.ui.autocomplete.js @@ -136,7 +136,7 @@ * @return container (which should be positioned and visible) */ updateList: function(unfilteredList, val) { - if (opt.minCharacters && val.length <= opt.minCharacters) { + if (typeof opt.minCharacters !== 'undefined' && val.length <= opt.minCharacters) { return false; }