Skip to content

Commit

Permalink
closes #139 dont warn during simulation about no initial state if the…
Browse files Browse the repository at this point in the history
… child is a documentation node
  • Loading branch information
finger563 committed Jul 28, 2022
1 parent 648b5fd commit c4a5df2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/visualizers/widgets/HFSMViz/Simulator/Simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,11 @@ define(['js/util',
var hasChildren = state.childrenIds.filter(function (cid) {
var child = self.nodes[ cid ];
if (child) {
return child.type != 'Internal Transition';
return child.type != 'Internal Transition' && child.type != 'Documentation';
}
}).length > 0;
if (hasChildren && init.length != 1) {
self.log(`WARNING: '${state.name}' (${stateId}) has children, but no initial state defined!`);
self.log(`WARNING: '${state.name}' (${stateId}) has child states, but no initial state defined!`);
} else if (!hasChildren && init.length != 0) {
self.log(`WARNING: '${state.name}' (${stateId}) has initial state, but no substates!`);
}
Expand Down

0 comments on commit c4a5df2

Please sign in to comment.