Merge pull request #11825 from drewmnoel/dmn-fix-openPaths-empty-param

Fix uncaught exception when open file dialog is cancelled
This commit is contained in:
Antonio Scandurra 2016-05-25 18:39:31 +02:00
commit 82b75b5fbb

View File

@ -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 is 0
return
devMode = Boolean(devMode)
safeMode = Boolean(safeMode)
clearWindowState = Boolean(clearWindowState)