From 814e8b5bed59caf1b4b4b4075ce7e7505a2fe63a Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Thu, 7 Mar 2013 16:03:56 -0800 Subject: [PATCH] fix #1000 --- select2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/select2.js b/select2.js index 6bb69577..394ea167 100644 --- a/select2.js +++ b/select2.js @@ -1321,7 +1321,7 @@ the specific language governing permissions and limitations under the Apache Lic self.opts.populateResults.call(this, results, data.results, {term: term, page: page, context:context}); self.postprocessResults(data, false, false); - + if (data.more===true) { more.detach().appendTo(results).text(self.opts.formatLoadMore(page+1)); window.setTimeout(function() { self.loadMoreIfNeeded(); }, 10); @@ -2703,7 +2703,7 @@ the specific language governing permissions and limitations under the Apache Lic maximumSelectionSize: 0, id: function (e) { return e.id; }, matcher: function(term, text) { - return text.toUpperCase().indexOf(term.toUpperCase()) >= 0; + return (''+text).toUpperCase().indexOf((''+term).toUpperCase()) >= 0; }, separator: ",", tokenSeparators: [],