mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-27 16:37:33 +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;
|
||||
}
|
||||
if (typeof amt !== "number" || amt <= 0) {
|
||||
if (typeof amt !== "number" || amt <= 0 || isNaN(amt)) {
|
||||
workerScript.log("donateToFaction", () => `Invalid donation amount: '${amt}'.`);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user