Check if element exists in ripple when it's reset

old
Javi Velasco 2017-01-24 11:06:26 +01:00
parent 31788ea7b6
commit 5049571d20
1 changed files with 1 additions and 1 deletions

View File

@ -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)