Fix disabled ripple click error
If ripple prop is false, this.refs.ripple will be undefined and will throw a TypeError every time handleMouseDown is called.old
parent
ae95446735
commit
ff936cbf70
|
@ -33,7 +33,7 @@ class Button extends React.Component {
|
||||||
|
|
||||||
handleMouseDown = (event) => {
|
handleMouseDown = (event) => {
|
||||||
events.pauseEvent(event);
|
events.pauseEvent(event);
|
||||||
this.refs.ripple.start(event);
|
if (this.refs.ripple) this.refs.ripple.start(event);
|
||||||
if (this.props.onMouseDown) this.props.onMouseDown(event);
|
if (this.props.onMouseDown) this.props.onMouseDown(event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue