We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5dea291 commit f3e96acCopy full SHA for f3e96ac
1 file changed
webapp/components/general/ControlPanelTreeItem.js
@@ -129,7 +129,7 @@ const ControlPanelTreeItem = (props) => {
129
const getColor = (nodeId) => {
130
const insts = instances.filter((instance) => instance.instancePath === nodeId);
131
const hasChildren = instances.some((instance) => instance.instancePath.startsWith(nodeId) && instance.instancePath !== nodeId);
132
- if (props.children.length === 0 && insts.length > 0 && "color" in insts[0]) {
+ if (props.children && props.children.length === 0 && insts.length > 0 && "color" in insts[0]) {
133
return insts[0].color
134
}
135
// we check if all children have the same color
0 commit comments