Browse Source

fix infinite loop

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

2
src/commands/firmwareRepair.js

@ -11,7 +11,7 @@ type Result = { progress: number }
const cmd: Command<Input, Result> = createCommand(
'firmwareRepair',
({ version }) => repair(''), // devicePath='' HACK to not depend on a devicePath because it's dynamic
({ version }) => repair('', version), // devicePath='' HACK to not depend on a devicePath because it's dynamic
)
export default cmd

5
src/components/SettingsPage/RepairDeviceButton.js

@ -61,6 +61,7 @@ class RepairDeviceButton extends PureComponent<Props, State> {
}
repairMcu = () => this.repair('0.8')
repairGeneric = () => this.repair()
render() {
const { t } = this.props
@ -78,8 +79,8 @@ class RepairDeviceButton extends PureComponent<Props, State> {
isOpened={opened}
onClose={this.close}
onReject={this.close}
onRepair={this.repair}
onRepairMCU={this.repair}
onRepair={this.repairGeneric}
onRepairMCU={this.repairMcu}
isLoading={isLoading}
title={t('settings.repairDevice.title')}
desc={t('settings.repairDevice.desc')}

Loading…
Cancel
Save