From cd317701216b39359c5fdcfd5e34b5ee25c7a62a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20=C5=BDu=C5=BEak?= Date: Tue, 7 Jul 2015 19:51:16 +0200 Subject: [PATCH] Guard against non-string messages in Pane.handleSaveError --- src/pane.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pane.coffee b/src/pane.coffee index 76d83a175..c19eb26d4 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -677,7 +677,7 @@ class Pane extends Model true handleSaveError: (error) -> - if error.code is 'EISDIR' or error.message?.endsWith('is a directory') + if error.code is 'EISDIR' or error.message?.endsWith?('is a directory') atom.notifications.addWarning("Unable to save file: #{error.message}") else if error.code is 'EACCES' and error.path? atom.notifications.addWarning("Unable to save file: Permission denied '#{error.path}'")