-
Notifications
You must be signed in to change notification settings - Fork 88
Resurface banner on reject. #7322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
Greptile OverviewGreptile SummaryThis PR changes The change is localized to the fides-js consent utility that controls whether the consent UI is shown again based on saved cookie state + experience metadata (TCF version hash, vendors, overrides). Confidence Score: 3/5
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 2 comments
| if ( | ||
| cookie.fides_meta.consentMethod === ConsentMethod.DISMISS || | ||
| cookie.fides_meta.consentMethod === ConsentMethod.REJECT | ||
| ) { | ||
| return true; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible crash on missing meta
cookie.fides_meta.consentMethod is accessed without guarding cookie.fides_meta. If a persisted/legacy cookie exists without fides_meta (or it’s been partially cleared), shouldResurfaceBanner() will throw for TCF experiences, breaking banner rendering. Consider optional-chaining (e.g. cookie.fides_meta?.consentMethod) or defaulting fides_meta when deserializing cookies so this path can’t throw.
Additional Comments (1)
This case label says it "returns false" but |
Ticket []
Description Of Changes
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works