Browse Source

clear on success and error

gre-patch-1
Valentin D. Pinkman 6 years ago
parent
commit
be167d8310
No known key found for this signature in database GPG Key ID: E7D110669FFB8D3E
  1. 2
      src/components/SettingsPage/RepairDeviceButton.js

2
src/components/SettingsPage/RepairDeviceButton.js

@ -58,9 +58,11 @@ class RepairDeviceButton extends PureComponent<Props, State> {
}, },
error: error => { error: error => {
logger.critical(error) logger.critical(error)
if (this.timeout) clearTimeout(this.timeout)
this.setState({ error, isLoading: false, progress: 0 }) this.setState({ error, isLoading: false, progress: 0 })
}, },
complete: () => { complete: () => {
if (this.timeout) clearTimeout(this.timeout)
this.setState({ opened: false, isLoading: false, progress: 0 }, () => { this.setState({ opened: false, isLoading: false, progress: 0 }, () => {
push('/manager') push('/manager')
}) })

Loading…
Cancel
Save