We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee2c47c commit 443dc3fCopy full SHA for 443dc3f
1 file changed
index.js
@@ -119,6 +119,7 @@ let dragging = -1;
119
let highlighted = [0, 0, 0, 0];
120
121
function clamp(x, lo, hi) {
122
+ if (isNaN(x)) return lo;
123
return Math.min(Math.max(x, lo), hi);
124
}
125
0 commit comments