Skip to content

Commit

Permalink
refactor: Improve StepManager's change detection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackRam-oss committed May 30, 2024
1 parent 47c0770 commit e3b3b7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/managers/StepManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ export default class GameStepManager {
try {
let lastStepDataOpenedLabelsString = JSON.stringify(GameStepManager.originalStepData.openedLabels)
let historyStepOpenedLabelsString = JSON.stringify(historyStep.openedLabels)
if (lastStepDataOpenedLabelsString === historyStepOpenedLabelsString) {
if (
lastStepDataOpenedLabelsString === historyStepOpenedLabelsString &&
GameStepManager.originalStepData.path === historyStep.path &&
GameStepManager.originalStepData.labelIndex === historyStep.labelIndex
) {
return
}
}
Expand Down

0 comments on commit e3b3b7f

Please sign in to comment.