-
Notifications
You must be signed in to change notification settings - Fork 1k
[labs/motion] chore: improve adjustments of ancestor condition check #4496
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
Conversation
🦋 Changeset detectedLatest commit: d24693e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultsthis-change
render
update
update-reflect
this-change, tip-of-tree, previous-release
render
update
nop-update
this-change, tip-of-tree, previous-release
render
update
this-change, tip-of-tree, previous-release
render
update
update-reflect
|
|
Please see https://github.com/lit/lit/blob/main/CONTRIBUTING.md#pull-requests We really need more of a description of what this change is for. What package? Is there an associated issue? We also need a test. |
This is just a code optimization, it has not caused any actual issues, and there is no need to add additional test cases. You only need to look at the code changes in these few lines to understand the meaning of this modification: diff |
augustjk
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.
Thanks for the PR. As Justin mentioned above, we do prefer there be a related issue or more description but this is indeed a small change.
It looks like there's no change in behavior since everything inside the condition wouldn't really have any effect even with an empty array, but the original code would never have skipped over that block as it seems to have intended so this change makes sense to me. I've left a suggestion with regards to our code style for condition checks.
|
The size of lit-html.js and lit-core.min.js are as expected. |
augustjk
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.
Thank you! I added a changeset describing the change.
AndrewJakubowicz
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.
Awesome!
ancestorPropsis an array there, so it's always not equalundefiend. There should validate itslength