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

Fix function declaration in if statement #6963

Merged
merged 1 commit into from
Jun 4, 2016

Conversation

sophiebits
Copy link
Collaborator

Firefox doesn't like these and throws.

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

@jimfb
Copy link
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

ghost commented Jun 4, 2016

@spicyj updated the pull request.

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

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
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
@@ -112,7 +112,7 @@ function print(outerComponent) {
var values = keys.map((childKey) => renderedChildren[childKey]);

if (keys.length) {
function dump(children) {
var dump = function(children) {
Copy link
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
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