mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-10-31 20:14:26 +00:00
Clear timer when unmounting RelativeTimestamp components (#5408)
Possibly the cause of #5379, #5377
This commit is contained in:
parent
3e2f793948
commit
894da3dcca
|
@ -94,6 +94,10 @@ export default class RelativeTimestamp extends React.Component {
|
||||||
this._scheduleNextUpdate(nextProps, nextState);
|
this._scheduleNextUpdate(nextProps, nextState);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount () {
|
||||||
|
clearTimeout(this._timer);
|
||||||
|
}
|
||||||
|
|
||||||
_scheduleNextUpdate (props, state) {
|
_scheduleNextUpdate (props, state) {
|
||||||
clearTimeout(this._timer);
|
clearTimeout(this._timer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue