Skip to content

Commit

Permalink
Merge pull request #66 from gluebi/63-use-query-params-for-consent-if…
Browse files Browse the repository at this point in the history
…-available

#63 Optional chaining
  • Loading branch information
gluebi authored Feb 22, 2023
2 parents 59295fe + 91b3490 commit c2cd6f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-cookie-comply-with-reject",
"description": "A Vue 3 component to handle cookie acceptance on your website",
"version": "0.2.6",
"version": "0.2.7",
"files": [
"dist"
],
Expand Down
5 changes: 4 additions & 1 deletion src/components/CookieComply.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ const checkValues = (): void => {
emit('on-cookie-comply-mount', getConsentValuesFromStorage());
}
watch(() => route.query, () => {
watch(() => route?.query, () => {
if (!route?.query) {
return
}
checkValues()
}, {
immediate: true
Expand Down

0 comments on commit c2cd6f7

Please sign in to comment.