Fix range numbers parsing
This commit is contained in:
parent
cda7ab0530
commit
508bab7e0f
|
@ -43,6 +43,10 @@ export function isValidUrl(value) {
|
|||
export function stringToRange(input, min, max) {
|
||||
let start, end;
|
||||
|
||||
if (typeof input !== 'string') {
|
||||
input = String(input);
|
||||
}
|
||||
|
||||
if (input.includes('-')) {
|
||||
const parts = input.split('-');
|
||||
start = parts[0] ? parseInt(parts[0], 10) : NaN;
|
||||
|
|
Loading…
Reference in New Issue