Closed fnesveda closed 2 years ago
When calling ow('value', undefined, ow.string), ow threw an unhelpful error:
ow('value', undefined, ow.string)
ow
TypeError: Cannot read property 'Symbol(test)' of undefined at isPredicate ...
because it tried to access a property on an undefined value.
undefined
This fixes it so that it throws the right error (as with other, non-undefined values):
Expected second argument to be a predicate or a string, got `undefined`
When calling
ow('value', undefined, ow.string)
,ow
threw an unhelpful error:because it tried to access a property on an
undefined
value.This fixes it so that it throws the right error (as with other, non-undefined values):