From 0f4ad0bbf551805179b17d6eb0abb5ae3e9ddabd Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 12 Jun 2013 14:30:56 -0700 Subject: [PATCH] Guard against a null initial path This will be the case when the .atom fold is opened from the config window. path.join() cannot be called with null values. --- src/atom-window.coffee | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/atom-window.coffee b/src/atom-window.coffee index 568d0a94f..e4e156ec2 100644 --- a/src/atom-window.coffee +++ b/src/atom-window.coffee @@ -28,11 +28,14 @@ class AtomWindow @browserWindow.loadSettings.initialPath containsPath: (pathToCheck) -> - if not pathToCheck + initialPath = @getInitialPath() + if not initialPath false - else if pathToCheck is @getInitialPath() + else if not pathToCheck + false + else if pathToCheck is initialPath true - else if pathToCheck.indexOf(path.join(@getInitialPath(), path.sep)) is 0 + else if pathToCheck.indexOf(path.join(initialPath, path.sep)) is 0 true else false