From: Jérôme Benoit Date: Sun, 11 Dec 2022 22:05:30 +0000 (+0100) Subject: Small cleanups in Utils.ts X-Git-Tag: v1.1.89~74 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=69bafbedae4dd101f6bf1a40091cecdb831a64b9;p=e-mobility-charging-stations-simulator.git Small cleanups in Utils.ts Signed-off-by: Jérôme Benoit --- diff --git a/src/utils/Utils.ts b/src/utils/Utils.ts index 006e9ddd..f27f0666 100644 --- a/src/utils/Utils.ts +++ b/src/utils/Utils.ts @@ -64,10 +64,10 @@ export default class Utils { } public static convertToInt(value: unknown): number { - let changedValue: number = value as number; if (!value) { return 0; } + let changedValue: number = value as number; if (Number.isSafeInteger(value)) { return value as number; } @@ -81,10 +81,10 @@ export default class Utils { } public static convertToFloat(value: unknown): number { - let changedValue: number = value as number; if (!value) { return 0; } + let changedValue: number = value as number; if (Utils.isString(value)) { changedValue = parseFloat(value as string); }