fix: typo
This commit is contained in:
parent
67ddfcb7ed
commit
9e694e9661
1 changed files with 4 additions and 4 deletions
|
@ -212,13 +212,13 @@ export function findComponentDownward (context, componentName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find components downward
|
// Find components downward
|
||||||
export function findComponentsDownward (context, componentName, ignoreComponetNames = []) {
|
export function findComponentsDownward (context, componentName, ignoreComponentNames = []) {
|
||||||
if (!Array.isArray(ignoreComponetNames)) {
|
if (!Array.isArray(ignoreComponentNames)) {
|
||||||
ignoreComponetNames = [ignoreComponetNames]
|
ignoreComponentNames = [ignoreComponentNames]
|
||||||
}
|
}
|
||||||
return context.$children.reduce((components, child) => {
|
return context.$children.reduce((components, child) => {
|
||||||
if (child.$options.name === componentName) components.push(child);
|
if (child.$options.name === componentName) components.push(child);
|
||||||
if (ignoreComponetNames.indexOf(child.$options.name) < 0) {
|
if (ignoreComponentNames.indexOf(child.$options.name) < 0) {
|
||||||
const foundChilds = findComponentsDownward(child, componentName);
|
const foundChilds = findComponentsDownward(child, componentName);
|
||||||
return components.concat(foundChilds);
|
return components.concat(foundChilds);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue