diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index 8ed797b79..9d3d5fa3a 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -13,7 +13,6 @@ import { SourceFileFlags } from "../SourceFile/SourceFileFlags"; import { dialogBoxCreate } from "../ui/React/DialogBox"; import { clearObject } from "../utils/helpers/clearObject"; -import { Router } from "../ui/GameRoot"; import { WHRNG } from "../Casino/RNG"; diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index ea97083a9..6c5e219fb 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -432,8 +432,11 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { throw makeRuntimeErrorMsg(funcName, `${argName} should be a string`); }, number: (funcName: string, argName: string, v: any): number => { - if (typeof v === "number") return v; - if (!isNaN(v) && !isNaN(parseFloat(v))) return parseFloat(v); + if (!isNaN(v)) + { + if (typeof v === "number") return v; + if (!isNaN(parseFloat(v))) return parseFloat(v); + } throw makeRuntimeErrorMsg(funcName, `${argName} should be a number`); }, boolean: (v: any): boolean => {