We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f49b389 commit 12bed64Copy full SHA for 12bed64
docs/js/instantsearch.js
@@ -76,16 +76,17 @@
76
const hierarchy = Object.entries(item.hierarchy).filter(([, value]) => value);
77
const breadcrumbsKeys = hierarchy.map(([key]) => key);
78
const groupNameKey = breadcrumbsKeys.shift();
79
+ const groupName = item.hierarchy[groupNameKey];
80
const entryNameKey = breadcrumbsKeys.pop();
81
const newItem = {
82
groupNameKey,
83
entryNameKey,
84
breadcrumbsKeys,
85
item: getClearedItem(item),
86
};
- const groupChildren = outputItemsMap[groupNameKey]?.children ?? [];
87
+ const groupChildren = outputItemsMap[groupName]?.children ?? [];
88
- outputItemsMap[groupNameKey] = {
89
+ outputItemsMap[groupName] = {
90
children: [...groupChildren, newItem],
91
92
});
0 commit comments