Skip to content

Commit

Permalink
fix: cleanup stale preview cookie from toolbar when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lihbr committed Jun 21, 2023
1 parent 87f73fb commit 3f3c9f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/runtime/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export default defineNuxtPlugin((nuxtApp) => {
defer: true
}]
})
} else {
// TODO: We might want to let user disable this behavior because it might have unexpected side effects
useCookie('io.prismic.preview').value = null
}

return {
Expand Down

0 comments on commit 3f3c9f2

Please sign in to comment.