mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
Guard against non-string messages in Pane.handleSaveError
This commit is contained in:
@@ -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}'")
|
||||
|
||||
Reference in New Issue
Block a user