Skip to content

Commit

Permalink
fix(ssr-plugin): use useHead instead of useMeta (#2449)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniil4udo committed Nov 16, 2022
1 parent fe4b964 commit 01c2820
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/nuxt/ssr-plugin.mjs
@@ -1,5 +1,5 @@
import { setSSRHandler } from '@vueuse/core'
import { defineNuxtPlugin, useCookie, useMeta } from '#imports'
import { defineNuxtPlugin, useCookie, useHead } from '#imports'

setSSRHandler('getDefaultStorage', () => {
const cookieMap = new Map()
Expand All @@ -18,14 +18,14 @@ setSSRHandler('getDefaultStorage', () => {
if (process.server) {
setSSRHandler('updateHTMLAttrs', (selector, attr, value) => {
if (selector === 'html') {
useMeta({
useHead({
htmlAttrs: {
[attr]: value,
},
})
}
else if (selector === 'body') {
useMeta({
useHead({
bodyAttrs: {
[attr]: value,
},
Expand Down

0 comments on commit 01c2820

Please sign in to comment.