From b21011139239f5506f5a8e9794fc0217fef97665 Mon Sep 17 00:00:00 2001 From: "Valentin D. Pinkman" Date: Tue, 5 Feb 2019 16:45:20 +0100 Subject: [PATCH] flow fixes and cleartimeout on close --- src/components/SettingsPage/RepairDeviceButton.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/SettingsPage/RepairDeviceButton.js b/src/components/SettingsPage/RepairDeviceButton.js index b3dc3457..9e9f2d54 100644 --- a/src/components/SettingsPage/RepairDeviceButton.js +++ b/src/components/SettingsPage/RepairDeviceButton.js @@ -42,9 +42,11 @@ class RepairDeviceButton extends PureComponent { open = () => this.setState({ opened: true, error: null }) sub: * + timeout: * close = () => { if (this.sub) this.sub.unsubscribe() + if (this.timeout) clearTimeout(this.timeout) this.setState({ opened: false, isLoading: false, error: null, progress: 0 }) }