mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix(vue-app): fix getNuxtChildComponents
method (#4969)
This commit is contained in:
parent
111455f99a
commit
dbf70999e4
@ -528,7 +528,7 @@ const noopFetch = () => {}
|
|||||||
// Special hot reload with asyncData(context)
|
// Special hot reload with asyncData(context)
|
||||||
function getNuxtChildComponents($parent, $components = []) {
|
function getNuxtChildComponents($parent, $components = []) {
|
||||||
$parent.$children.forEach(($child) => {
|
$parent.$children.forEach(($child) => {
|
||||||
if ($child.$vnode.data.nuxtChild && !$components.find(c =>(c.$options.__file === $child.$options.__file))) {
|
if ($child.$vnode && $child.$vnode.data.nuxtChild && !$components.find(c =>(c.$options.__file === $child.$options.__file))) {
|
||||||
$components.push($child)
|
$components.push($child)
|
||||||
}
|
}
|
||||||
if ($child.$children && $child.$children.length) {
|
if ($child.$children && $child.$children.length) {
|
||||||
|
Loading…
Reference in New Issue
Block a user