Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fiorisi authored Oct 29, 2024
1 parent 64ca75e commit 81e757a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function filterMotors() {
const maxDiameter = parseFloat(document.getElementById("diameter-max").value);

const filteredMotors = motorData.filter(motor => {
return (!minDiameter || motor.outer_diameter >= minDiameter) &&
(!maxDiameter || motor.outer_diameter <= maxDiameter);
return (!minDiameter || motor.diameter_mm >= minDiameter) &&
(!maxDiameter || motor.diameter_mm <= maxDiameter);
});

displayResults(filteredMotors);
Expand All @@ -41,4 +41,4 @@ function displayResults(motors) {
`;
resultsBody.appendChild(row);
});
}
}

0 comments on commit 81e757a

Please sign in to comment.