mirror of
https://github.com/element-hq/element-web.git
synced 2024-11-30 23:31:28 +03:00
Merge pull request #1179 from matrix-org/luke/fix-query-matcher-empty-query
Don't try to match with an empty query string
This commit is contained in:
commit
89d0ec4de8
1 changed files with 3 additions and 0 deletions
|
@ -86,6 +86,9 @@ export default class QueryMatcher {
|
|||
if (this.options.shouldMatchWordsOnly) {
|
||||
query = query.replace(/[^\w]/g, '');
|
||||
}
|
||||
if (query.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const results = [];
|
||||
this.keyMap.keys.forEach((key) => {
|
||||
let resultKey = key.toLowerCase();
|
||||
|
|
Loading…
Reference in a new issue