Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
): number {
options.limitationEnabled = options?.limitationEnabled ?? true;
options.unitMultiplier = options?.unitMultiplier ?? 1;
+ const numberValue = isNaN(parseInt(value)) ? Infinity : parseInt(value);
return options?.limitationEnabled
- ? Math.min(parseInt(value) * options.unitMultiplier, limit)
- : parseInt(value) * options.unitMultiplier;
+ ? Math.min(numberValue * options.unitMultiplier, limit)
+ : numberValue * options.unitMultiplier;
}
}