fix(core): Don’t error if turn.order.next returns undefined#614
Merged
nicolodavis merged 3 commits intoApr 11, 2020
Conversation
nicolodavis
previously approved these changes
Apr 11, 2020
Member
|
Perhaps we should change the interface (in the future) to return a constant END_PHASE to make it more obvious. |
nicolodavis
approved these changes
Apr 11, 2020
Contributor
|
I ran into this on v0.39.6 (where the changelog https://github.com/nicolodavis/boardgame.io/blob/master/docs/documentation/CHANGELOG.md says this was fixed) It looks like @delucis 's commit was reverted in eb1e060#diff-ffe51a82f97e27f74a79b6b8382009e3L292 Was this accidental? |
Member
|
Ah, that looks like a bad merge. |
Member
|
Fixed and released in 0.39.7. |
nicolodavis
added a commit
that referenced
this pull request
Apr 14, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a bug raised by @flamecoals in #605 where an error is logged if
turn.order.nextreturns undefined, which is permitted as a way of ending the phase.I’ve also amended the turn order interface to indicate that
nextcan return undefined.