-
Notifications
You must be signed in to change notification settings - Fork 20
fix: Remove conditional attributes after the condition is unmatched #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Remove conditional attributes after the condition is unmatched #57
Conversation
brennj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small thing needs to be changed and its only a lint error. Otherwise, tests are fantastic and I'm so happy we have this now.
2427ac9 to
9fb57cf
Compare
dilvane
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fantastic fix! Thanks for this, until now, we were using the "workaround" to override the attribute like you showed in the playground, but with the "const" the need for this fix is more visible!
|
|
Description
Fixes #56
How? When the fields get updated after parsing each conditional, compare the conditional attrs to the previous base field attrs. If an attr in the prev base is no longer present in the conditional, then remove it.