I have schema like this, which worked without problems till version 6.1.0.
{
param: Joi.boolean().when('param2', { is: null, then: Joi.forbidden() })
}
As of version 6.1.1 it start to throw TypeError:
TypeError: Cannot read property 'isJoi' of null
at [object Object].internals.Alternatives.when (node_modules/joi/lib/alternatives.js:84:20)
at [object Object].internals.Any.when (node_modules/joi/lib/any.js:360:28)