Skip to content

cookie_control_consent doesn't reset anymore

Issue

After declining all cookies the cookiebar won't show itself until you clear your cookies.

Versions that work 1.8.9

Non working version (cookiebar doesn't show after declining all)

https://gitlab.com/broj42/nuxt-cookie-control/-/blob/master/components/CookieControl.vue#L56

setConsent({type, consent=true, reload=true, declineAll=false}){ this.cookies.set({name: 'cookie_control_consent', value: consent, expires: this.expirationDate});

Consent is constantly true even when you run declineAll on the modal decline button.

<button @click="setConsent({declineAll: true})" v-text="cookies.text.declineAll"/>

Working version (cookiebar returns after declining all)

https://gitlab.com/broj42/nuxt-cookie-control/-/blob/eb550ead219e49bb36de9a149dc2c0dc6f548687/components/CookieControl.vue#L52

setConsent({type, consent=true}){ this.cookies.set({name: 'cookie_control_consent', value: consent, expires: this.expirationDate});

Consent is reset and the cookie-bar will display again

<button @click="setConsent({consent: false})"