From 7836910ccb47f93eb614164e06d9fd62ac5272ff Mon Sep 17 00:00:00 2001 From: sveisvei Date: Mon, 5 Dec 2016 15:23:17 +0100 Subject: [PATCH] clear timer --- frontend/src/component/feature/view-edit-container.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/feature/view-edit-container.jsx b/frontend/src/component/feature/view-edit-container.jsx index 389c203051..f08f9af9db 100644 --- a/frontend/src/component/feature/view-edit-container.jsx +++ b/frontend/src/component/feature/view-edit-container.jsx @@ -26,12 +26,16 @@ class EditFeatureToggleWrapper extends React.Component { } this.props.fetchSeenApps(); this.props.fetchFeatureMetrics(); - setInterval(() => { + this.timer = setInterval(() => { this.props.fetchSeenApps(); this.props.fetchFeatureMetrics(); }, 5000); } + componentWillUnmount () { + clearInterval(this.timer); + } + render () { const { toggleFeature,