diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2017-10-16 03:03:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-16 03:03:36 +0200 |
commit | 894da3dcca781e27ce9c5130f1021526ac8a6887 (patch) | |
tree | 43047470ea489a168398e8e9ddb08d67cd9a653c /app | |
parent | 3e2f79394891bae1a0afbf8899855a0b10ef9e15 (diff) |
Clear timer when unmounting RelativeTimestamp components (#5408)
Possibly the cause of #5379, #5377
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/mastodon/components/relative_timestamp.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/javascript/mastodon/components/relative_timestamp.js b/app/javascript/mastodon/components/relative_timestamp.js index 534d83fac..51588e78c 100644 --- a/app/javascript/mastodon/components/relative_timestamp.js +++ b/app/javascript/mastodon/components/relative_timestamp.js @@ -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); |