Skip to content

Commit

Permalink
fix: #131 - repaired validation
Browse files Browse the repository at this point in the history
  • Loading branch information
AloisSeckar committed Sep 29, 2023
1 parent 7928831 commit 87d0df1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Binary file modified backstop_data/bitmaps_reference/action-1b-9-916_m.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion utils/wbsc-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ function checkOutcome (inputs: WBSCInput[]) {
validation = attachValidation(validation, useT('editor.validation.noAdvanceAfterOut'))
}
}
const maxReachedBase = reachedBases[reachedBases.length - 1] || 0
const maxReachedBase = reachedBases[reachedBases.length - 1] || output.base
const currentReachedBase = Math.max(output.base, output.errorTarget)

if (currentReachedBase > maxReachedBase || (currentReachedBase === maxReachedBase && noAdvActions.includes(input.specAction))) {
validation = attachValidation(validation, useT('editor.validation.advanceInOrder'))
}
Expand Down

0 comments on commit 87d0df1

Please # to comment.