Skip to content

Commit 3f3c9f2

Browse files
committed
fix: cleanup stale preview cookie from toolbar when disabled
1 parent 87f73fb commit 3f3c9f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/runtime/plugin.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ export default defineNuxtPlugin((nuxtApp) => {
7373
defer: true
7474
}]
7575
})
76+
} else {
77+
// TODO: We might want to let user disable this behavior because it might have unexpected side effects
78+
useCookie('io.prismic.preview').value = null
7679
}
7780

7881
return {

0 commit comments

Comments
 (0)