Fix open file dialog cancelling error

master
kts of kettek (Urami) 2017-08-02 18:10:18 -07:00
parent 2cfeab01c4
commit 0754af48cf
1 changed files with 1 additions and 1 deletions

2
Cat.js
View File

@ -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]);
});