fix(Transition): fix validate duration (#1188)

This commit is contained in:
underfin
2020-05-18 22:09:10 +08:00
committed by GitHub
parent 8e30d0c74c
commit d73a508a73
3 changed files with 17 additions and 11 deletions

View File

@@ -125,3 +125,8 @@ export const def = (obj: object, key: string | symbol, value: any) => {
value
})
}
export const toNumber = (val: any): any => {
const n = parseFloat(val)
return isNaN(n) ? val : n
}