From 6297269271211c376d64513161e93b302d04d15d Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 2 Mar 2016 02:33:36 -0800 Subject: [PATCH] menu: open torrent file dialog comes from main window --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index addc2130..06b5ced6 100644 --- a/index.js +++ b/index.js @@ -101,11 +101,11 @@ var template = [ label: 'Open Torrent File...', accelerator: 'CmdOrCtrl+O', click: function () { - electron.dialog.showOpenDialog({ + electron.dialog.showOpenDialog(mainWindow, { title: 'Select a .torrent file to open.', properties: [ 'openFile', 'multiSelections' ] }, function (filenames) { - if (!Array.isArary(filenames)) return + if (!Array.isArray(filenames)) return filenames.forEach(function (filename) { mainWindow.send('action', 'addTorrent', filename) })