Skip to content

Fix function declaration in if statement#6963

Merged
sophiebits merged 1 commit intofacebook:masterfrom
sophiebits:semi
Jun 4, 2016
Merged

Fix function declaration in if statement#6963
sophiebits merged 1 commit intofacebook:masterfrom
sophiebits:semi

Conversation

@sophiebits
Copy link
Copy Markdown
Collaborator

Firefox doesn't like these and throws.

cc @zpao (for lint), @jimfb (for sync)

@jimfb
Copy link
Copy Markdown
Contributor

jimfb commented Jun 4, 2016

👍

Firefox doesn't like these and throws.
@sophiebits sophiebits merged commit 3c3c30a into facebook:master Jun 4, 2016
@ghost
Copy link
Copy Markdown

ghost commented Jun 4, 2016

@spicyj updated the pull request.

@@ -130,7 +130,7 @@ function print(outerComponent) {
debugger;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this is only used interactively and that's an error case.

@zpao zpao added this to the 15-next milestone Jun 6, 2016
zpao pushed a commit to zpao/react that referenced this pull request Jun 8, 2016
Firefox doesn't like these and throws.
(cherry picked from commit 3c3c30a)
zpao pushed a commit that referenced this pull request Jun 14, 2016
Firefox doesn't like these and throws.
(cherry picked from commit 3c3c30a)
@zpao zpao modified the milestones: 15-next, 15.2.0 Jun 14, 2016

if (keys.length) {
function dump(children) {
var dump = function(children) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it's better to write var dump = function dump(children) { to keep function names in stack trace

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The code have here is fine for what I use it for.

@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants