Skip to content

Commit

Permalink
fix bug that was causing log to be erased after flow.processMove
Browse files Browse the repository at this point in the history
  • Loading branch information
darthfiddler committed Jan 11, 2018
1 parent 73d5b73 commit 23d9726
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export function createGameReducer({game, numPlayers}) {
state = { ...state, G, log, _id: state._id + 1 };

// Allow the flow reducer to process any triggers that happen after moves.
return game.flow.processMove(state, action);
const t = game.flow.processMove({ G: state.G, ctx: state.ctx }, action);
return { ...state, G: t.G, ctx: t.ctx };
}

case Actions.RESTORE: {
Expand Down

0 comments on commit 23d9726

Please sign in to comment.