mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(nuxt): do not warn for non-existent default layout (#7748)
This commit is contained in:
parent
1c26e07141
commit
b68cf0706d
@ -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.`)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user