Skip to content

Commit b7af34d

Browse files
committed
fix bug of 'facts' when clicking on nextSeg in period 2
1 parent d640ea9 commit b7af34d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/platform/src/services/GameService.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ export function computeSegmentStartResults(game, ctx, { reducers }) {
12571257
const results = game.activePeriod.results
12581258
.filter((result) => result.type === DB.PlayerResultType.PERIOD_START)
12591259
.reduce((acc, result, ix, allResults) => {
1260-
const { result: facts } = reducers.SegmentResult.apply(result.facts, {
1260+
let { result: facts } = reducers.SegmentResult.apply(result.facts, {
12611261
type: reducers.SegmentResult.ActionTypes.SEGMENT_RESULTS_INITIALIZE,
12621262
payload: {
12631263
playerRole: result.player.role,
@@ -1268,6 +1268,11 @@ export function computeSegmentStartResults(game, ctx, { reducers }) {
12681268
},
12691269
})
12701270

1271+
// TODO(JJ): Double-check with RS
1272+
if (facts.facts) {
1273+
facts = facts.facts
1274+
}
1275+
12711276
const common = {
12721277
facts,
12731278
periodIx: game.activePeriodIx,

0 commit comments

Comments
 (0)