Skip to content
This repository was archived by the owner on Jan 9, 2024. It is now read-only.

Commit 92a132c

Browse files
authored
fix: add another source for groups of filters and if not found default to empty array (#203)
1 parent c1d8305 commit 92a132c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ const DEFAULT_CONTEXT = {
1818
exports.parseFilters = json => {
1919
const pc = json.contents.twoColumnSearchResultsRenderer.primaryContents;
2020
const wrapper = pc.sectionListRenderer || pc.richGridRenderer;
21-
const filterWrapper = (wrapper.subMenu || wrapper.submenu).searchSubMenuRenderer.groups;
21+
const filterWrapper = (wrapper.subMenu || wrapper.submenu).searchSubMenuRenderer.groups ||
22+
json.header.searchHeaderRenderer.searchFilterButton.buttonRenderer.command.openPopupAction.popup
23+
.searchFilterOptionsDialogRenderer.groups || [];
2224
const parsedGroups = new Map();
2325
for (const filterGroup of filterWrapper) {
2426
const singleFilterGroup = new Map();

0 commit comments

Comments
 (0)