Skip to content
Snippets Groups Projects
Commit 6a98b284 authored by Julia Friesel's avatar Julia Friesel
Browse files

Remove superfluous try/catch

parent 9ee78194
No related branches found
No related tags found
No related merge requests found
...@@ -25,17 +25,12 @@ export default class DataManagement extends Component { ...@@ -25,17 +25,12 @@ export default class DataManagement extends Component {
} }
startImportFlow = async (shouldDeleteExistingData) => { startImportFlow = async (shouldDeleteExistingData) => {
try { this.startLoading()
this.onStartLoading() const fileContent = await getFileContent()
const fileContent = await getFileContent() if (fileContent) {
if (fileContent) { await importData(shouldDeleteExistingData, fileContent)
await importData(shouldDeleteExistingData, fileContent)
}
} catch(err) {
return
} finally {
this.onEndLoading()
} }
this.endLoading()
} }
render() { render() {
...@@ -54,7 +49,7 @@ export default class DataManagement extends Component { ...@@ -54,7 +49,7 @@ export default class DataManagement extends Component {
<FramedSegment title={labels.import.button}> <FramedSegment title={labels.import.button}>
<AppText>{labels.import.segmentExplainer}</AppText> <AppText>{labels.import.segmentExplainer}</AppText>
<SettingsButton <SettingsButton
onPress= {() => openImportDialog(this.onImportData)} onPress= {() => openImportDialog(this.startImportFlow)}
> >
{labels.import.button} {labels.import.button}
</SettingsButton> </SettingsButton>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment