-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Fix popover demo event.target is null #17104
[docs] Fix popover demo event.target is null #17104
Conversation
No bundle size changes comparing 343ae8e...44864d2 |
@@ -99,9 +99,10 @@ function AnchorPlayground(props) { | |||
}; | |||
|
|||
const handleNumberInputChange = key => event => { | |||
const value = event.target.value; |
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.
I think this is better:
const {value} = event.target;
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.
I don't think that it makes a difference. I believe that the convention in the codebase is to not destructure the two options are equivalent.
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.
How did this PR fix a bug? As far as I can see, there is no functional difference in the new code and old code; if target
is null, it will still be dereferenced and cause a crash.
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.
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.
Yeap, let's change the approach this time!
@spaceexperiment Thanks |
Closes #17101