Skip to content

Commit d488511

Browse files
committed
refactor: walkComponentTree payload is now always an array of nodes
1 parent 1a04f64 commit d488511

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/api/src/api/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export type HookPayloads = {
4747
}
4848
[Hooks.WALK_COMPONENT_TREE]: {
4949
componentInstance: ComponentInstance
50-
componentTreeData: ComponentTreeNode
50+
componentTreeData: ComponentTreeNode[]
5151
maxDepth: number
5252
filter: string
5353
}

packages/app-backend-vue3/src/components/tree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class ComponentWalker {
4545
*/
4646
private findQualifiedChildren (instance: any, depth: number) {
4747
if (this.componentFilter.isQualified(instance)) {
48-
return this.capture(instance, null, depth)
48+
return [this.capture(instance, null, depth)]
4949
} else if (instance.subTree) {
5050
// TODO functional components
5151
return this.findQualifiedChildrenFromList(this.getInternalInstanceChildren(instance.subTree), depth)

0 commit comments

Comments
 (0)