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

Type declaration in action...() missing #6

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

Type declaration in action...() missing #6

Jersyfi opened this issue Jan 9, 2023 · 1 comment
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed
Milestone

Comments

@Jersyfi
Copy link
Owner

Jersyfi commented Jan 9, 2023

The Type declaration in the functions actions...() are missing. Could be causing the newConsentObject to not be set.

@Jersyfi Jersyfi self-assigned this Jan 9, 2023
@Jersyfi Jersyfi added bug Something isn't working help wanted Extra attention is needed labels Jan 9, 2023
@Jersyfi Jersyfi added this to the v1.0.0 milestone Jan 11, 2023
@Jersyfi
Copy link
Owner Author

Jersyfi commented Jan 11, 2023

Fixed all action...() functions actionCheckbox(), actionAccept(), actionAccept() & actionNecessary() with a correct type declaration of ConsentObjectType to fix wrong data change of consentObject.viewed.

For example i showed the changes with actionAccept().

From

const actionAccept = () => {
    const newConsentObjectData = consentObject.data

    afterSomeActions({
        viewed: true,
        data: newConsentObjectData
    })
}

To

const actionAccept = () => {
    const newConsentObject = consentObject

    newConsentObject['viewed'] = true

    afterSomeActions(newConsentObject)
}

@Jersyfi Jersyfi closed this as completed Jan 11, 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 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant