Skip to content

Commit

Permalink
[IconButton] Remove unused conditional
Browse files Browse the repository at this point in the history
It appears that this conditional was added in 77a3d71, but even at that time,
there does not seem to be any calls to set the state of `hovered`, and so it it
always `undefined` which means we always are entering this `if` block.
  • Loading branch information
m14t committed Sep 21, 2016
1 parent 8fddb05 commit 3718c66
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/IconButton/IconButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ class IconButton extends Component {
if (keyboardFocused && !this.props.disabled) {
this.showTooltip();
if (this.props.onFocus) this.props.onFocus(event);
} else if (!this.state.hovered) {
this.hideTooltip();
if (this.props.onBlur) this.props.onBlur(event);
}

this.hideTooltip();
if (this.props.onBlur) this.props.onBlur(event);

if (this.props.onKeyboardFocus) {
this.props.onKeyboardFocus(event, keyboardFocused);
}
Expand Down

0 comments on commit 3718c66

Please sign in to comment.