mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
Merge pull request #2342 from woody-lam-cwl/nan-donation
Fix #2275 accepts NaN donation bug
This commit is contained in:
commit
0ea139d2f6
@ -1189,7 +1189,7 @@ export function NetscriptSingularity(
|
|||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (typeof amt !== "number" || amt <= 0) {
|
if (typeof amt !== "number" || amt <= 0 || isNaN(amt)) {
|
||||||
workerScript.log("donateToFaction", () => `Invalid donation amount: '${amt}'.`);
|
workerScript.log("donateToFaction", () => `Invalid donation amount: '${amt}'.`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user