Provide some defaults.

Otherwise we’ll get:

TypeError: Cannot read property 'pathToOpen' of undefined

when called from ‘application:new-file’.
This commit is contained in:
joshaber
2015-12-30 14:32:55 -05:00
parent 5d85ea18ae
commit 7024e000a8

View File

@@ -370,7 +370,7 @@ class AtomApplication
# :safeMode - Boolean to control the opened window's safe mode.
# :profileStartup - Boolean to control creating a profile of the startup time.
# :window - {AtomWindow} to open file paths in.
openPath: ({pathToOpen, pidToKillWhenClosed, newWindow, devMode, safeMode, profileStartup, window}) ->
openPath: ({pathToOpen, pidToKillWhenClosed, newWindow, devMode, safeMode, profileStartup, window} = {}) ->
@openPaths({pathsToOpen: [pathToOpen], pidToKillWhenClosed, newWindow, devMode, safeMode, profileStartup, window})
# Public: Opens multiple paths, in existing windows if possible.