Skip to content

Commit 2833bb5

Browse files
authored
Fix Add Widget always shows recent queries list (#4658)
1 parent 7ff5af1 commit 2833bb5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/app/components/QuerySelector.jsx

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ import useSearchResults from "@/lib/hooks/useSearchResults";
1111

1212
const { Option } = Select;
1313
function search(term) {
14+
if (term === null) {
15+
return Promise.resolve(null);
16+
}
17+
1418
// get recent
1519
if (!term) {
1620
return Query.recent().then(results => results.filter(item => !item.is_draft)); // filter out draft

0 commit comments

Comments
 (0)