File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,16 +90,16 @@ const updateNodeLabels = (node, instances) => {
9090 let { label } = node . value ;
9191 // Check if there is a count of mapped instances
9292 if ( ( tasks [ node . id ] && tasks [ node . id ] . is_mapped ) || node . value . isMapped ) {
93- const firstChildId = node . children [ 0 ] . id ;
93+ const id = ! ! node . children && node . children . length ? node . children [ 0 ] . id : node . value . id ;
9494
9595 let count = ' ' ;
9696
9797 // get count from mapped_states or the first child's mapped_states
9898 // TODO: update this count for when we can nest mapped tasks inside of mapped task groups
9999 if ( instances [ node . id ] && instances [ node . id ] . mapped_states ) {
100100 count = instances [ node . id ] . mapped_states . length ;
101- } else if ( firstChildId && instances [ firstChildId ] ) {
102- count = instances [ firstChildId ] . mapped_states . length ;
101+ } else if ( id && instances [ id ] ) {
102+ count = instances [ id ] . mapped_states . length ;
103103 }
104104
105105 if ( ! label . includes ( `[${ count } ]` ) ) {
You can’t perform that action at this time.
0 commit comments