diff --git a/editor/src/index.js b/editor/src/index.js index 9fe9bd0..f285da3 100644 --- a/editor/src/index.js +++ b/editor/src/index.js @@ -77,11 +77,16 @@ function showSearchResults(searchTool, query, input, value, resultType) { } function showSearchResultsExtended(element, template, searchTool, query, input, value, resultType, options) { + const $lc = $(element) let results = searchTool(query) + if (query.length === 0 || !results.length) { + $lc.fadeOut() + return + } + let opt = options || {}; - const $lc = $(element) $lc.data('result-type', resultType) if (opt.belowCursor) {