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 always true if statement #2271

Closed
wants to merge 2 commits into from

Conversation

pedrocunial
Copy link

Since isStateful is a function, it will always be truthy, this PR simplifies an if-statement related to it.

Since `isStateful` is a function, it will always be truthy, this PR simplifies an if-statement related to it.
@@ -641,29 +641,27 @@ class ReactSixteenAdapter extends EnzymeAdapter {
));
}

if (isStateful) {
Copy link
Member

Choose a reason for hiding this comment

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

This probably was meant to be isStateful(component)?

Copy link
Author

Choose a reason for hiding this comment

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

Truth be said, this was my first contact with this code, so I'm not a 100% on the full context of this (even though I'm opening a PR in this code block).

By looking at the context, however, I agree that this really should be isStateful(Component), so I'm updating to this!

@ljharb
Copy link
Member

ljharb commented Nov 1, 2019

The change is now great - but I think you've found a bug, and before fixing it, we should add a test to prevent it from getting broken again.

Copy link

@swaibat swaibat left a comment

Choose a reason for hiding this comment

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

great job

@ljharb
Copy link
Member

ljharb commented Dec 9, 2019

@pedrocunial any interest in completing this PR with a regression test?

@lh0x00

This comment has been minimized.

@ljharb

This comment has been minimized.

@lh0x00

This comment has been minimized.

@ljharb
Copy link
Member

ljharb commented Feb 11, 2020

@pedrocunial are you no longer interested in completing this PR?

Either way, I'd prefer it stay open so it can be coopted by someone else.

@ljharb ljharb reopened this Feb 11, 2020
@pedrocunial
Copy link
Author

@ljharb, yeah, sorry I'm not really interested in continuing this. Sorry for the whole confusion and also for closing the PR itself.

@ljharb
Copy link
Member

ljharb commented Dec 21, 2020

I believe this was subsumed by #2476.

@ljharb ljharb closed this Dec 21, 2020
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.

4 participants