Skip to content
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

Remove redundant conditional statements #18627

Closed
wants to merge 1 commit into from
Closed

Conversation

BetaSu
Copy link
Contributor

@BetaSu BetaSu commented Apr 16, 2020

Summary

Remove redundant conditional statements

Since it will continue when the props are equal in line 767, there is no need to compare whether they are not equal.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 16, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ae788c4:

Sandbox Source
wispy-platform-4ivy8 Configuration

@sizebot
Copy link

sizebot commented Apr 16, 2020

No significant bundle size changes to report.

Size changes (stable)

Generated by 🚫 dangerJS against ae788c4

@sizebot
Copy link

sizebot commented Apr 16, 2020

No significant bundle size changes to report.

Size changes (experimental)

Generated by 🚫 dangerJS against ae788c4

@@ -824,10 +824,7 @@ export function diffProperties(
// inserted already.
}
} else if (propKey === CHILDREN) {
if (
lastProp !== nextProp &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems nice, since we already check for this above

@@ -405,12 +405,11 @@ function ChildReconciler(shouldTrackSideEffects) {
);
created.return = returnFiber;
return created;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is subjective and I think should be reverted.

@@ -405,12 +405,11 @@ function ChildReconciler(shouldTrackSideEffects) {
);
created.return = returnFiber;
return created;
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants