Fixed error being thrown if path was not provided while saving a new file fixes #9

This commit is contained in:
Bibodha Neupane 2015-02-20 10:57:00 -07:00
parent e1b3561252
commit 2f6e7ae664

View file

@ -1,5 +1,9 @@
class Ex
write: -> atom.workspace.getActiveEditor().save()
write: ->
if atom.workspace.getActiveTextEditor().getPath() isnt undefined
atom.workspace.getActiveEditor().save()
else
atom.workspace.getActivePane().saveActiveItemAs()
w: => @write()
module.exports = Ex