Browse Source

Clear timer when unmounting RelativeTimestamp components (#5408)

Possibly the cause of #5379, #5377
pull/4/head
Eugen Rochko 7 years ago
committed by GitHub
parent
commit
894da3dcca
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      app/javascript/mastodon/components/relative_timestamp.js

+ 4
- 0
app/javascript/mastodon/components/relative_timestamp.js 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);

Loading…
Cancel
Save