guardian / csnx

Monorepo for Guardian UIs
https://guardian.github.io/csnx
Apache License 2.0
35 stars 2 forks source link

getConsentFor handle unknown ids #1564

Closed Jakeii closed 3 months ago

Jakeii commented 3 months ago

What are you changing?

move google-analytics to a new part of vendorDataManager that will remove its keys even if the id is no longer in the vendorlist.

This is currently throwing an error as the vendorDataManager checks for consent before removing a key.

This also narrows the type of getConsentFor and the vendorlist to catch errors in the future.

Why?

If we remove a vendor we still want to be removing it's data from cookies/localStorage.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 7635bfd52143ce271baba0b862dc17fd5954d105

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions[bot] commented 3 months ago

[!TIP] Once this PR is ready to go, add the run_chromatic label to run the Chromatic tests.

This saves us a lot of money by not running the tests before we need them.