Skip to content

Commit 2e6cefe

Browse files
authored
Update packages/autocomplete-plugin-query-suggestions/src/createQuerySuggestionsPlugin.ts
1 parent 933390c commit 2e6cefe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/autocomplete-plugin-query-suggestions/src/createQuerySuggestionsPlugin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ export function createQuerySuggestionsPlugin<
137137
.map((x) => x.value)
138138
.slice(0, categoriesPerItem);
139139

140-
itemsWithCategoriesAdded++;
140+
if (categories.length > 0) {
141+
itemsWithCategoriesAdded++;
142+
}
141143

142144
for (const category of categories) {
143145
items.push({

0 commit comments

Comments
 (0)