Skip to content

Commit 8084937

Browse files
committed
ensure path.dirname is not called with null
1 parent 572497a commit 8084937

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/python-debugger-view.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class PythonDebuggerView extends View
6565
editor = atom.workspace.getActiveTextEditor()
6666
activePath = editor.getPath()
6767
relative = atom.project.relativizePath(activePath)
68-
pathToWorkspace = relative[0] || path.dirname(activePath)
68+
pathToWorkspace = relative[0] || (path.dirname(activePath) if activePath?)
6969
pathToWorkspace
7070

7171
runApp: ->

lib/python-debugger.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ module.exports = PythonDebugger =
4646

4747
activePath = editor?.getPath()
4848
relative = atom.project.relativizePath(activePath)
49-
themPaths = relative[0] || path.dirname(activePath)
49+
themPaths = relative[0] || (path.dirname(activePath) if activePath?)

0 commit comments

Comments
 (0)