Skip to content
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

Wrong state modification of consentObject #2

Closed
Jersyfi opened this issue Jan 8, 2023 · 1 comment
Closed

Wrong state modification of consentObject #2

Jersyfi opened this issue Jan 8, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Jersyfi
Copy link
Owner

Jersyfi commented Jan 8, 2023

What is happening?

The state consentObject has a wrong manipulation.
image

Where the error maybe occurs

handleConsentObjectChange()

@Jersyfi Jersyfi added the bug Something isn't working label Jan 8, 2023
@Jersyfi Jersyfi self-assigned this Jan 8, 2023
@Jersyfi
Copy link
Owner Author

Jersyfi commented Jan 8, 2023

Changed the handleConsentObjectChange() to fix the state object changing.

From

setConsentObject(prevConsentObject => ({
  ...prevConsentObject,
  newConsentObject
}))

To

setConsentObject(newConsentObject)

@Jersyfi Jersyfi closed this as completed Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant