From 92df095137be05c106cafe89b34b5d7054b7babc Mon Sep 17 00:00:00 2001 From: Drew Noel Date: Mon, 23 May 2016 19:54:55 -0400 Subject: [PATCH 1/2] Fix uncaught exception when open file dialog is cancelled --- src/main-process/atom-application.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main-process/atom-application.coffee b/src/main-process/atom-application.coffee index f48a4a016..d332123d2 100644 --- a/src/main-process/atom-application.coffee +++ b/src/main-process/atom-application.coffee @@ -445,6 +445,9 @@ class AtomApplication # :window - {AtomWindow} to open file paths in. # :addToLastWindow - Boolean of whether this should be opened in last focused window. openPaths: ({initialPaths, pathsToOpen, executedFrom, pidToKillWhenClosed, newWindow, devMode, safeMode, windowDimensions, profileStartup, window, clearWindowState, addToLastWindow, env}={}) -> + if not pathsToOpen? or pathsToOpen.length == 0 + return + devMode = Boolean(devMode) safeMode = Boolean(safeMode) clearWindowState = Boolean(clearWindowState) From 37086c6c099a0eb0175368474286da876864be81 Mon Sep 17 00:00:00 2001 From: Drew Noel Date: Mon, 23 May 2016 20:08:17 -0400 Subject: [PATCH 2/2] Use proper coffeescript style --- src/main-process/atom-application.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main-process/atom-application.coffee b/src/main-process/atom-application.coffee index d332123d2..ba2fce4a4 100644 --- a/src/main-process/atom-application.coffee +++ b/src/main-process/atom-application.coffee @@ -445,7 +445,7 @@ class AtomApplication # :window - {AtomWindow} to open file paths in. # :addToLastWindow - Boolean of whether this should be opened in last focused window. openPaths: ({initialPaths, pathsToOpen, executedFrom, pidToKillWhenClosed, newWindow, devMode, safeMode, windowDimensions, profileStartup, window, clearWindowState, addToLastWindow, env}={}) -> - if not pathsToOpen? or pathsToOpen.length == 0 + if not pathsToOpen? or pathsToOpen.length is 0 return devMode = Boolean(devMode)