Check if element exists in ripple when it's reset
parent
31788ea7b6
commit
5049571d20
|
@ -112,7 +112,7 @@ const rippleFactory = (options = {}) => {
|
|||
const runningState = { active: true, restarting: false };
|
||||
const ripples = {...this.state.ripples, [key]: initialState };
|
||||
this.setState({ ripples }, () => {
|
||||
this.refs[key].offsetWidth; //eslint-disable-line no-unused-expressions
|
||||
if (this.refs[key]) this.refs[key].offsetWidth; //eslint-disable-line no-unused-expressions
|
||||
this.setState({ ripples: {
|
||||
...this.state.ripples,
|
||||
[key]: Object.assign({}, this.state.ripples[key], runningState)
|
||||
|
|
Loading…
Reference in New Issue