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
Sorry for the long title, but i think I found an issue where the type check wrongly validates an object. Reproduction link to a codesandbox but here is the code:
The cause seems to be type: Union(Literal("A"), Literal("B")). If you split AB into A and B, it works as expected since the validator doesn't even look at A or B.
The validator first checks AB. When it does this, it checks foodbar and adds {} + FooBar it to the VisitedState. Next, when it checks C, the type property matches and then when it checks foorbar, {} + FooBar is already in the VisitedState so the object type checks successfully.
I'm not sure the best solution. Maybe the code shouldn't assume that if value and A are in VisitedState, it has been validated successfully? Thanks for the help!
The text was updated successfully, but these errors were encountered:
Sorry for the long title, but i think I found an issue where the type check wrongly validates an object. Reproduction link to a codesandbox but here is the code:
The cause seems to be
type: Union(Literal("A"), Literal("B"))
. If you splitAB
intoA
andB
, it works as expected since the validator doesn't even look atA
orB
.The validator first checks
AB
. When it does this, it checksfoodbar
and adds{}
+FooBar
it to theVisitedState
. Next, when it checksC
, thetype
property matches and then when it checksfoorbar
,{}
+FooBar
is already in theVisitedState
so the object type checks successfully.I'm not sure the best solution. Maybe the code shouldn't assume that if
value
andA
are inVisitedState
, it has been validated successfully? Thanks for the help!The text was updated successfully, but these errors were encountered: