mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-11 13:16:12 +00:00
Switch to native number check
Change-type: patch
This commit is contained in:
parent
eccb1bd9ad
commit
809a5fae25
@ -21,7 +21,7 @@ export function normalizeUuidProp(
|
|||||||
params: { [key: string]: any },
|
params: { [key: string]: any },
|
||||||
propName = 'uuid',
|
propName = 'uuid',
|
||||||
) {
|
) {
|
||||||
if (_.isNumber(params[propName])) {
|
if (typeof params[propName] === 'number') {
|
||||||
params[propName] =
|
params[propName] =
|
||||||
params[propName + '_raw'] || _.toString(params[propName]);
|
params[propName + '_raw'] || _.toString(params[propName]);
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ export async function disambiguateReleaseParam(
|
|||||||
paramRaw: string | undefined,
|
paramRaw: string | undefined,
|
||||||
) {
|
) {
|
||||||
// the user has passed an argument that was parsed as a string
|
// the user has passed an argument that was parsed as a string
|
||||||
if (!_.isNumber(param)) {
|
if (typeof param !== 'number') {
|
||||||
return param;
|
return param;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user