Clear timer when unmounting RelativeTimestamp components (#5408)

Possibly the cause of #5379, #5377
This commit is contained in:
Eugen Rochko 2017-10-16 03:03:36 +02:00 committed by GitHub
parent 23dad325da
commit 4a0367d04a

View file

@ -94,6 +94,10 @@ export default class RelativeTimestamp extends React.Component {
this._scheduleNextUpdate(nextProps, nextState);
}
componentWillUnmount () {
clearTimeout(this._timer);
}
_scheduleNextUpdate (props, state) {
clearTimeout(this._timer);