@felte/common
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -11,3 +11,3 @@ import type { FormControl, Obj, FieldValue, Touched } from '../types'; | ||
/** @ignore */ | ||
export declare function getInputTextOrNumber(el: FormControl): string | number | undefined; | ||
export declare function getInputTextOrNumber(el: FormControl): string | number | null; | ||
/** | ||
@@ -14,0 +14,0 @@ * @ignore |
@@ -11,3 +11,3 @@ import type { FormControl, Obj, FieldValue, Touched } from '../types'; | ||
/** @ignore */ | ||
export declare function getInputTextOrNumber(el: FormControl): string | number | undefined; | ||
export declare function getInputTextOrNumber(el: FormControl): string | number | null; | ||
/** | ||
@@ -14,0 +14,0 @@ * @ignore |
@@ -46,3 +46,3 @@ import { isFormControl, isFieldSetElement, isInputElement, isSelectElement } from './typeGuards.js'; | ||
if (el.type.match(/^(number|range)$/)) { | ||
return !el.value ? undefined : +el.value; | ||
return !el.value ? null : +el.value; | ||
} | ||
@@ -49,0 +49,0 @@ else { |
{ | ||
"name": "@felte/common", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"description": "Common utilities for Felte packages", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
280174