Fixed the tests

This commit is contained in:
Aria Minaei 2021-09-17 15:37:34 +02:00
parent 7815fb2dc3
commit eb695a1c91

View file

@ -143,7 +143,7 @@ export const number = (
)} given.`, )} given.`,
) )
} }
if (typeof opts === 'object' && opts) { if (typeof opts === 'object' && opts !== null) {
if (Object.prototype.hasOwnProperty.call(opts, 'range')) { if (Object.prototype.hasOwnProperty.call(opts, 'range')) {
if (!Array.isArray(opts.range)) { if (!Array.isArray(opts.range)) {
throw new Error( throw new Error(
@ -163,7 +163,6 @@ export const number = (
) )
} }
} }
}
if (Object.prototype.hasOwnProperty.call(opts, 'nudgeMultiplier')) { if (Object.prototype.hasOwnProperty.call(opts, 'nudgeMultiplier')) {
if ( if (
typeof opts!.nudgeMultiplier !== 'number' || typeof opts!.nudgeMultiplier !== 'number' ||
@ -186,6 +185,7 @@ export const number = (
} }
} }
} }
}
return { return {
type: 'number', type: 'number',
valueType: 0, valueType: 0,