Skip to content

switch ordering of logical and#11462

Merged
gaearon merged 1 commit intofacebook:masterfrom
xjlim:optimize
Nov 5, 2017
Merged

switch ordering of logical and#11462
gaearon merged 1 commit intofacebook:masterfrom
xjlim:optimize

Conversation

@xjlim
Copy link
Copy Markdown
Contributor

@xjlim xjlim commented Nov 5, 2017

Fix #11460

@gaearon
Copy link
Copy Markdown
Collaborator

gaearon commented Nov 5, 2017

I think this is good. Let's wait for CI to pass.

@xjlim
Copy link
Copy Markdown
Contributor Author

xjlim commented Nov 5, 2017

@gaearon I changed this too as they seem to follow the same behaviour.

}

if (lowerCasedName.indexOf('on') === 0 && lowerCasedName.length > 2) {
if (lowerCasedName.length > 2 && lowerCasedName.indexOf('on') === 0) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This one is not necessary. We're guarding against [] access outside of bounds in particular. Here it doesn't happen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see. Sorry I accidentally messes up with the git, should I squash them?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Doesn't matter, we squash on merge anyway.

@gaearon gaearon merged commit e2e7fcc into facebook:master Nov 5, 2017
Ethan-Arrowood pushed a commit to Ethan-Arrowood/react that referenced this pull request Dec 8, 2017
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.

3 participants