@constela/runtime 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -583,9 +583,9 @@ function callMathMethod(method, args) {
|
|
|
583
583
|
const numbers = args.filter((a) => typeof a === "number");
|
|
584
584
|
switch (method) {
|
|
585
585
|
case "min":
|
|
586
|
-
return Math.min(...numbers);
|
|
586
|
+
return numbers.length > 0 ? Math.min(...numbers) : void 0;
|
|
587
587
|
case "max":
|
|
588
|
-
return Math.max(...numbers);
|
|
588
|
+
return numbers.length > 0 ? Math.max(...numbers) : void 0;
|
|
589
589
|
case "round": {
|
|
590
590
|
const num = numbers[0];
|
|
591
591
|
return num !== void 0 ? Math.round(num) : void 0;
|