Skip to content

Commit

Permalink
fix: handle HMR in DD page
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Jul 6, 2022
1 parent a4bd1a3 commit e63306c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/runtime/pages/document-driven.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
import { useContent, useContentHead } from '#imports'
const { page } = useContent()
const currentPage = page.value
const currentPage = ref(page.value)
watch(page, (v) => {
if (v._id === currentPage.value._id) {
currentPage.value = v
}
})
useContentHead(page)
</script>
Expand Down

0 comments on commit e63306c

Please sign in to comment.