You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has something problem, since smoothTime option value can set to be 0, but the || operator means check "falsely" (false == 0), so if we set that the 0, || operator will assume that the value is false lead to be apply default value.
So I think we could use ?? operator, who will check undefined or null instead of the "falsely".
In this line:
https://github.com/worka/vanilla-js-wheel-zoom/blob/727db6934e4d84d562c87a5e44bb66fccca7f894/src/wheel-zoom.js#L372C60-L372C60
Has something problem, since
smoothTime
option value can set to be0
, but the||
operator means check "falsely" (false == 0
), so if we set that the0
,||
operator will assume that the value is false lead to be apply default value.So I think we could use
??
operator, who will checkundefined
ornull
instead of the "falsely".Fix:
The text was updated successfully, but these errors were encountered: