From 2f6e7ae6646f27af992cd78f4cbe8d7c2a06b02d Mon Sep 17 00:00:00 2001 From: Bibodha Neupane Date: Fri, 20 Feb 2015 10:57:00 -0700 Subject: [PATCH] Fixed error being thrown if path was not provided while saving a new file fixes #9 --- lib/ex.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ex.coffee b/lib/ex.coffee index 6d81188..9e61de4 100644 --- a/lib/ex.coffee +++ b/lib/ex.coffee @@ -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