Skip to content

Commit

Permalink
fix(google): fix extension behavior on unsupported udm values (#474)
Browse files Browse the repository at this point in the history
Previously, if an udm value was present but not supported by the extension,
uBlacklist would not return any serpHandler on Google Desktop.
  • Loading branch information
aug-dev authored May 26, 2024
1 parent 2d30bc5 commit babb2f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scripts/search-engines/google-desktop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,9 @@ export function getDesktopSerpHandler(
tbm: string,
udm: string,
): SerpHandler | null {
const serpHandler = desktopSerpHandlers[udm ? `udm=${udm}` : tbm];
const udmKey = `udm=${udm}`;
const serpHandler =
desktopSerpHandlers[udmKey in desktopSerpHandlers ? udmKey : tbm];
if (!serpHandler) {
return null;
}
Expand Down

0 comments on commit babb2f5

Please sign in to comment.