diff --git a/electron/main.js b/electron/main.js index c276bb92..46ac6e10 100644 --- a/electron/main.js +++ b/electron/main.js @@ -357,7 +357,7 @@ let imageCache = {}; ipcMain.on('image:download', function(event, url, partition) { const tmp = require('tmp'); const mime = require('mime'); - let file = imageCache[url]; + let file = imageCache[`${url}`]; if (file) { if (file.complete) { shell.openItem(file.path); @@ -375,7 +375,7 @@ ipcMain.on('image:download', function(event, url, partition) { }); tmpWindow.webContents.session.once('will-download', (event, downloadItem) => { - imageCache[url] = file = { + imageCache[`${url}`] = file = { path: tmp.tmpNameSync() + '.' + mime.getExtension(downloadItem.getMimeType()) ,complete: false };