Skip to content

Commit

Permalink
record solve just once
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhao committed Feb 1, 2021
1 parent 90e4016 commit e15bb70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/Game.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ export default class Game extends Component {
});
}
if (this.game.solved) {
if (this.lastRecordedSolve === this.state.gid) return;
this.lastRecordedSolve = this.state.gid;
if (this.gameModel.puzzleModel) {
this.gameModel.puzzleModel.logSolve(this.state.gid, {
solved: true,
Expand Down

1 comment on commit e15bb70

@vercel
Copy link

@vercel vercel bot commented on e15bb70 Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.