Fix a bug when the prefix was exactly a title of an article.

In this case, the article did not show up in the search results.
Now it does.
This commit is contained in:
mossroy 2016-01-08 17:14:35 +01:00
parent fb21691f5e
commit 0586176312

View File

@ -125,7 +125,7 @@ define(['zimfile', 'zimDirEntry', 'util', 'utf8'],
return 1;
else if (dirEntry.namespace > "A")
return -1;
return prefix < dirEntry.title ? -1 : 1;
return prefix <= dirEntry.title ? -1 : 1;
});
}, true).then(function(firstIndex) {
var titles = [];