Skip to content

Commit f9a807b

Browse files
committed
fix
1 parent 93453fa commit f9a807b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/runtime/evaluation.coffee

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,12 @@ module.exports =
131131
return path
132132
# invoked from normal command usage
133133
file = client.editorPath(atom.workspace.getCenter().getActiveTextEditor())
134-
if !file
135-
atom.notifications.addError 'This file has no path.'
136-
else
134+
if file
137135
return path.dirname(file)
138136

137+
atom.notifications.addError 'This file has no path.'
138+
return null
139+
139140
cdProject: ->
140141
dirs = atom.project.getPaths()
141142
if dirs.length < 1

0 commit comments

Comments
 (0)