Skip to content

Commit

Permalink
Fix a bug in the bootstrap process for Regions
Browse files Browse the repository at this point in the history
  • Loading branch information
David Mesquita-Morris committed Mar 2, 2016
1 parent 6326a4d commit 3899e29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Version 5.3.1
Fix a bug in the bootstrap process for Regions.

# Version 5.3.0
Complete re-write taking all of the logic up to date when compared to the JavaScript version.

Expand Down
2 changes: 1 addition & 1 deletion src/Runtime/InitialiseElements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public override void VisitRegion (Region<TInstance> region, bool deepHistoryAbov
this.Behaviour(region).leave += (message, instance, history) => this.Behaviour(instance.GetCurrent(region)).leave(message, instance, history);

// enter the appropriate child vertex when entering the region
if (deepHistoryAbove || regionInitial != null || regionInitial.IsHistory) { // NOTE: history needs to be determined at runtime
if (deepHistoryAbove || regionInitial == null || regionInitial.IsHistory) { // NOTE: history needs to be determined at runtime
this.Behaviour(region).endEnter += (message, instance, history) => (this.Behaviour((history || regionInitial.IsHistory) ? (Vertex<TInstance>)instance.GetCurrent(region) ?? regionInitial : regionInitial)).Enter(message, instance, history || regionInitial.Kind == PseudoStateKind.DeepHistory);
} else {
this.Behaviour(region).endEnter += this.Behaviour(regionInitial).Enter;
Expand Down

0 comments on commit 3899e29

Please sign in to comment.