diff --git a/src/autocomplete/QueryMatcher.js b/src/autocomplete/QueryMatcher.js index f85d518fee..07398e7a5f 100644 --- a/src/autocomplete/QueryMatcher.js +++ b/src/autocomplete/QueryMatcher.js @@ -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();