Skip to content

Commit

Permalink
Fix bug where blank allowableResponses not handled correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
fuddster authored Jan 8, 2024
1 parent dac07ec commit df19d22
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions resources/js/scoutingPASS.js
Original file line number Diff line number Diff line change
Expand Up @@ -1093,15 +1093,15 @@ function onFieldClick(event) {
let box = ((Math.ceil(event.offsetY / target.height * resY) - 1) * resX) + Math.ceil(event.offsetX / target.width * resX);
let coords = event.offsetX + "," + event.offsetY;

let allowableResponses = document.getElementById("allowableResponses" + base).value.split(',').map(Number);
let allowableResponses = document.getElementById("allowableResponses" + base).value;

if(allowableResponses != "none"){
if (allowableResponses.indexOf(box)==-1){
allowableResponsesList = allowableRepsonses.split(',').map(Number);
if (allowableResponsesList.indexOf(box)==-1){
return;
}
}


//Cumulating values
let changingXY = document.getElementById("XY" + base);
let changingInput = document.getElementById("input" + base);
Expand Down

0 comments on commit df19d22

Please sign in to comment.