Menu

#15 wrong results in the search function

open
nobody
None
5
2006-02-20
2006-02-20
Anton
No

The line:
if (!standalone && (mEntry.indexOf(userInput) == 0))
{

should be as:
if (!standalone && (mEntry.indexOf(userInput) != -1))
{

indexOf returns -1 in case if substring not found.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB