From 27145d0f50855e58e73a257df2afbf5914e55b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Ezr?= Date: Mon, 11 Sep 2017 20:46:52 +0200 Subject: [PATCH] compare same as sorting --- src/bloodhound/search_index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bloodhound/search_index.js b/src/bloodhound/search_index.js index 0577c4fbf2..b3d0e19226 100644 --- a/src/bloodhound/search_index.js +++ b/src/bloodhound/search_index.js @@ -174,11 +174,11 @@ var SearchIndex = window.SearchIndex = (function() { var lenArrayA = arrayA.length, lenArrayB = arrayB.length; while (ai < lenArrayA && bi < lenArrayB) { - if (arrayA[ai] < arrayB[bi]) { + if (arrayA[ai].toString() < arrayB[bi].toString()) { ai++; } - else if (arrayA[ai] > arrayB[bi]) { + else if (arrayA[ai].toString() > arrayB[bi].toString()) { bi++; }