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

Commit

Permalink
fix: add another source for groups of filters and if not found defaul…
Browse files Browse the repository at this point in the history
…t to empty array (#203)
  • Loading branch information
dafatov authored Aug 11, 2023
1 parent c1d8305 commit 92a132c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const DEFAULT_CONTEXT = {
exports.parseFilters = json => {
const pc = json.contents.twoColumnSearchResultsRenderer.primaryContents;
const wrapper = pc.sectionListRenderer || pc.richGridRenderer;
const filterWrapper = (wrapper.subMenu || wrapper.submenu).searchSubMenuRenderer.groups;
const filterWrapper = (wrapper.subMenu || wrapper.submenu).searchSubMenuRenderer.groups ||
json.header.searchHeaderRenderer.searchFilterButton.buttonRenderer.command.openPopupAction.popup
.searchFilterOptionsDialogRenderer.groups || [];
const parsedGroups = new Map();
for (const filterGroup of filterWrapper) {
const singleFilterGroup = new Map();
Expand Down

0 comments on commit 92a132c

Please sign in to comment.