mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
typeahead: Use startsWith instead of a falsey index check.
This commit is contained in:
@@ -350,7 +350,7 @@ import {get_string_diff} from "../../src/util";
|
||||
let item;
|
||||
|
||||
while ((item = items.shift())) {
|
||||
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) {
|
||||
if (item.toLowerCase().startsWith(this.query.toLowerCase())) {
|
||||
beginswith.push(item);
|
||||
} else if (item.includes(this.query)) {
|
||||
caseSensitive.push(item);
|
||||
|
||||
Reference in New Issue
Block a user