mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-22 00:19:24 +03:00
Don't assume save is always passed a success callback
This commit is contained in:
parent
bd1982ede1
commit
92d728295f
@ -517,14 +517,14 @@ class Editor extends View
|
||||
$(window).off 'resize', @_setSoftWrapColumn
|
||||
|
||||
save: (onSuccess) ->
|
||||
if not @getPath()
|
||||
if @getPath()
|
||||
@getBuffer().save()
|
||||
onSuccess?()
|
||||
else
|
||||
atom.showSaveDialog (path) =>
|
||||
if path
|
||||
@getBuffer().saveAs(path)
|
||||
onSuccess()
|
||||
else
|
||||
@getBuffer().save()
|
||||
onSuccess()
|
||||
onSuccess?()
|
||||
|
||||
subscribeToFontSize: ->
|
||||
return unless rootView = @rootView()
|
||||
|
Loading…
Reference in New Issue
Block a user