-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
Conversation
👍 |
Firefox doesn't like these and throws.
@spicyj updated the pull request. |
@@ -130,7 +130,7 @@ function print(outerComponent) { | |||
debugger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right?
There was a problem hiding this comment.
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.
Firefox doesn't like these and throws. (cherry picked from commit 3c3c30a)
Firefox doesn't like these and throws. (cherry picked from commit 3c3c30a)
@@ -112,7 +112,7 @@ function print(outerComponent) { | |||
var values = keys.map((childKey) => renderedChildren[childKey]); | |||
|
|||
if (keys.length) { | |||
function dump(children) { | |||
var dump = function(children) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Firefox doesn't like these and throws.
cc @zpao (for lint), @jimfb (for sync)