Skip to content

Commit

Permalink
Fix default number nudge funcion (theatre-js#328)
Browse files Browse the repository at this point in the history
Fix default number nudge function
  • Loading branch information
AndrewPrifer authored Oct 26, 2022
1 parent 43714fd commit 455ac77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion theatre/core/src/propTypes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ const defaultNumberNudgeFn: NumberNudgeFn = ({
magnitude,
}) => {
const {range} = config
if (range) {
if (range && !range.includes(Infinity) && !range.includes(-Infinity)) {
return (
deltaFraction * (range[1] - range[0]) * magnitude * config.nudgeMultiplier
)
Expand Down

0 comments on commit 455ac77

Please sign in to comment.