From 0754af48cfa6f687d2d761ffa64770758c03bd84 Mon Sep 17 00:00:00 2001 From: "kts of kettek (Urami)" Date: Wed, 2 Aug 2017 18:10:18 -0700 Subject: [PATCH] Fix open file dialog cancelling error --- Cat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cat.js b/Cat.js index 088cd5c..b08dfad 100644 --- a/Cat.js +++ b/Cat.js @@ -70,7 +70,7 @@ Cat.openProject = function() { {name: 'HTML', extensions: ['html', 'htm']} ] }, function(filenames) { - if (filenames.length == 0) return; + if (!filenames || filenames.length == 0) return; Cat.loadProject(filenames[0]); ipcRenderer.send('open-file', filenames[0]); });