Skip to content

Commit 5ecd227

Browse files
committedMar 11, 2025·
fix(vue): prevent calling useHead in colors
1 parent 556ebb0 commit 5ecd227

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
 

‎src/runtime/plugins/colors.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,7 @@ export default defineNuxtPlugin(() => {
5555
}]
5656
}
5757

58-
useHead(headData)
58+
if (!nuxtApp.isVue) {
59+
useHead(headData)
60+
}
5961
})

‎src/runtime/vue/stubs.ts

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const useState = <T>(key: string, init: () => T): Ref<T> => {
6161
export function useNuxtApp() {
6262
return {
6363
isHydrating: true,
64+
isVue: true,
6465
payload: { serverRendered: false }
6566
}
6667
}

0 commit comments

Comments
 (0)
Please sign in to comment.