From 69bafbedae4dd101f6bf1a40091cecdb831a64b9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 11 Dec 2022 23:05:30 +0100 Subject: [PATCH] Small cleanups in Utils.ts MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils/Utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.34.1