瀏覽代碼

fix: wrong threshold clamping

Sv443 1 年之前
父節點
當前提交
d23ea99089
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/utils.ts

+ 1 - 1
src/utils.ts

@@ -245,5 +245,5 @@ export function autoPlural(word: string, num: number | unknown[]) {
 
 /** Ensures the passed `value` always stays between `min` and `max` */
 export function clamp(value: number, min: number, max: number) {
-  return Math.max(Math.min(value, min), max);
+  return Math.max(Math.min(value, max), min);
 }