diff options
Diffstat (limited to 'src/electron/ipc-api/download.ts')
-rw-r--r-- | src/electron/ipc-api/download.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/electron/ipc-api/download.ts b/src/electron/ipc-api/download.ts index 822658f26..af15b157e 100644 --- a/src/electron/ipc-api/download.ts +++ b/src/electron/ipc-api/download.ts | |||
@@ -7,7 +7,7 @@ import { PathLike } from 'fs'; | |||
7 | const debug = require('debug')('Ferdi:ipcApi:download'); | 7 | const debug = require('debug')('Ferdi:ipcApi:download'); |
8 | 8 | ||
9 | function decodeBase64Image(dataString: string) { | 9 | function decodeBase64Image(dataString: string) { |
10 | const matches = dataString.match(/^data:([A-Za-z-+/]+);base64,(.+)$/); | 10 | const matches = dataString.match(/^data:([+/A-Za-z-]+);base64,(.+)$/); |
11 | 11 | ||
12 | if (matches?.length !== 3) { | 12 | if (matches?.length !== 3) { |
13 | return new Error('Invalid input string'); | 13 | return new Error('Invalid input string'); |
@@ -47,12 +47,12 @@ export default (params: { mainWindow: BrowserWindow }) => { | |||
47 | ); | 47 | ); |
48 | 48 | ||
49 | debug('File blob saved to', saveDialog.filePath); | 49 | debug('File blob saved to', saveDialog.filePath); |
50 | } catch (err) { | 50 | } catch (error) { |
51 | console.log(err); | 51 | console.log(error); |
52 | } | 52 | } |
53 | } | 53 | } |
54 | } catch (e) { | 54 | } catch (error) { |
55 | console.error(e); | 55 | console.error(error); |
56 | } | 56 | } |
57 | }, | 57 | }, |
58 | ); | 58 | ); |