Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(nuxt): do not warn for non-existent default layout (#7748)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 22, 2022
1 parent 1c26e07 commit b68cf07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/components/layout.ts
Expand Up @@ -21,7 +21,7 @@ export default defineComponent({
if (process.dev && process.client) {
onMounted(() => {
nextTick(() => {
if (_layout && ['#comment', '#text'].includes(vnode?.el?.nodeName)) {
if (_layout && _layout in layouts && ['#comment', '#text'].includes(vnode?.el?.nodeName)) {
console.warn(`[nuxt] \`${_layout}\` layout does not have a single root node and will cause errors when navigating between routes.`)
}
})
Expand Down

0 comments on commit b68cf07

Please sign in to comment.