🎨 Use prettier emptiness check

This commit is contained in:
Max Brunsfeld
2015-02-24 15:31:51 -08:00
parent 88c2cef91f
commit 33af0f028b

View File

@@ -132,7 +132,7 @@ class TextEditor extends Model
subscribeToBuffer: ->
@buffer.retain()
@subscribe @buffer.onDidChangePath =>
unless atom.project.getPaths()[0]?
unless atom.project.getPaths().length > 0
atom.project.setPaths([path.dirname(@getPath())])
@emit "title-changed"
@emitter.emit 'did-change-title', @getTitle()