Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
}
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;
}
}
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);
}