You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read property '$_mutateRebuild' of undefined
What result did you expect?
I expected for joi to ignore the fact that the schema hadn't changed or to throw a more friendlier type of error, the first option being preferred and seems in keeping with the fact that Joi.string().optional().optional() works
The text was updated successfully, but these errors were encountered:
Support plan
Context
What are you trying to achieve or the steps to reproduce?
Try to run
fork
to apply.optional
to all keys of anJoi.object
(https://github.com/hapipal/schwifty/blob/cffa382e9411e404c5524c69ed39f028e24506a7/lib/model.js#L146) howeverit seems that if
.fork
is run on a schema that already hasoptional
applied that there is an error thrown. See reproduction belowhttps://runkit.com/optii/5e399335239b800013ea2b06
What was the result you got?
TypeError: Cannot read property '$_mutateRebuild' of undefined
What result did you expect?
I expected for joi to ignore the fact that the schema hadn't changed or to throw a more friendlier type of error, the first option being preferred and seems in keeping with the fact that
Joi.string().optional().optional()
worksThe text was updated successfully, but these errors were encountered: