From b3ed3e6d1abd83b25faa883387401151de372965 Mon Sep 17 00:00:00 2001 From: btzr-io Date: Thu, 21 Jun 2018 14:16:55 -0600 Subject: [PATCH] tidy up --- .../component/common/file-exporter.jsx | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/renderer/component/common/file-exporter.jsx b/src/renderer/component/common/file-exporter.jsx index d426c1583..fe32fa1d4 100644 --- a/src/renderer/component/common/file-exporter.jsx +++ b/src/renderer/component/common/file-exporter.jsx @@ -55,16 +55,20 @@ class FileExporter extends React.PureComponent { ], }; - remote.dialog.showSaveDialog(remote.getCurrentWindow(), options, filename => { - // User hit cancel so do nothing: - if (!filename) return; - // Get extension and remove initial dot - const format = path.extname(filename).replace(/\./g, ''); - // Parse data to string with the chosen format - const parsed = parseData(data, format, filters); - // Write file - parsed && this.handleFileCreation(filename, parsed); - }); + remote.dialog.showSaveDialog( + remote.getCurrentWindow(), + options, + filename => { + // User hit cancel so do nothing: + if (!filename) return; + // Get extension and remove initial dot + const format = path.extname(filename).replace(/\./g, ''); + // Parse data to string with the chosen format + const parsed = parseData(data, format, filters); + // Write file + parsed && this.handleFileCreation(filename, parsed); + } + ); } render() {