mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-07 19:14:37 +01:00
Recover from null moneyTracker
There shouldn't be any way to get null, but it was reported to occur and this will recover when this happens.
This commit is contained in:
@ -31,7 +31,7 @@ export class MoneySourceTracker {
|
||||
// Record money earned
|
||||
record(amt: number, source: string): void {
|
||||
const sanitizedSource = source.toLowerCase();
|
||||
if (typeof this[sanitizedSource] !== "number") {
|
||||
if (typeof this[sanitizedSource] !== "number" && this[sanitizedSource] !== null) {
|
||||
console.warn(`MoneySourceTracker.record() called with invalid source: ${source}`);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user