Skip to content

Commit 2ac7716

Browse files
authored
Merge pull request #29 from sean1292/staging
Fixed a bug in the tree graph
2 parents c4a488d + ac1bec6 commit 2ac7716

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/BottomTabs.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
109109
};
110110

111111
handleClick = (event: any, node: any) => {
112-
this.props.changeFocusComponent({ title: event.name });
112+
if (!event.attributes.Type) {
113+
this.props.changeFocusComponent({ title: event.name });
114+
}
113115
};
114116

115117
generateComponentTree(componentId: number, components: ComponentsInt) {
@@ -122,9 +124,10 @@ class BottomTabs extends Component<BottomTabsPropsInt, StateInt> {
122124
this.generateComponentTree(child.childComponentId, components),
123125
);
124126
} else {
127+
let str = { Type: 'HTML Element' };
125128
tree.children.push({
126129
name: child.componentName,
127-
attributes: {},
130+
attributes: str,
128131
children: [],
129132
});
130133
}

src/utils/getSelectable.util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function findAncestors(
2828
};
2929
}
3030

31-
const newAncestors: Array<Number> = [];
31+
const newAncestors: number[] = [];
3232

3333
for (let i = 0; i < components.length; i++) {
3434
if (componentsToCheck.includes(components[i].id)) {

0 commit comments

Comments
 (0)