Skip to content

Commit 708ee56

Browse files
committed
[bugfix] Correctly convert possibleGoal to goal
1 parent c76be45 commit 708ee56

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/game-events/CurrentEvents.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,8 @@
7575
return '';
7676
},
7777
acceptGoal(gameEvent) {
78-
let goalEvent = {};
79-
Object.assign(goalEvent, gameEvent);
80-
goalEvent.type = 'goal';
78+
let goalEvent = {type: 'goal', origins: gameEvent.origins, details: {goal: {}}};
79+
Object.assign(goalEvent.details.goal, gameEvent.details.possibleGoal);
8180
this.$socket.sendObj({
8281
gameEvent: goalEvent
8382
});

0 commit comments

Comments
 (0)