Skip to content

Commit

Permalink
Fix reshape cookies to use already blocking extension
Browse files Browse the repository at this point in the history
  • Loading branch information
amovar18 committed Aug 5, 2024
1 parent bd03216 commit bdaac5a
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ const reshapeCookies = (cookies: CookieFrameStorageType) => {
],
};

let blockingStatus = deriveBlockingStatus(networkEvents);

//@ts-ignore -- Since this has to be run for data coming from extension only.
if (globalThis?.PSAT_EXTENSION) {
blockingStatus = cookieObj[key].blockingStatus;
}

acc[key] = {
...cookieObj[key],
...acc[key],
Expand All @@ -72,7 +79,7 @@ const reshapeCookies = (cookies: CookieFrameStorageType) => {
acc[key]?.exemptionReason || cookieObj[key]?.exemptionReason,
frameUrls,
networkEvents,
blockingStatus: deriveBlockingStatus(networkEvents),
blockingStatus,
};
} else {
acc[key] = cookieObj[key];
Expand Down

0 comments on commit bdaac5a

Please sign in to comment.