Skip to content

Commit

Permalink
refactor: Don’t call no-op UpdateStage when arg is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Sep 18, 2019
1 parent 43d4719 commit d64e22d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ export function Flow({ moves, phases, endIf, turn, events, plugins }) {
let { ctx } = state;
let { activePlayers, _activePlayersMoveLimit } = ctx;

if (next) {
if (next && arg) {
next.push({ fn: UpdateStage, arg, playerID });
}

Expand Down

0 comments on commit d64e22d

Please sign in to comment.