Skip to content

Commit 3526cfb

Browse files
committed
fix: argument validation for nodeCost
1 parent 0e0fb27 commit 3526cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ap-calc/script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function main() {
4444
log.warn("Using '5' as fallback value for --max");
4545
apMax = 144;
4646
}
47-
if (nodeCost && isNaN(nodeCost) && nodeCost < 1) {
47+
if (typeof nodeCost == "number" && (isNaN(nodeCost) || nodeCost < 1)) {
4848
log.error(
4949
`Could not parse argument for --node '${args.values.node}'. Argument must integer > 0`
5050
);

0 commit comments

Comments
 (0)