Don't show when empty

This commit is contained in:
Kevin Sawicki 2012-10-23 16:09:29 -07:00
parent 8acb37338d
commit f720b14f22
2 changed files with 7 additions and 1 deletions

View File

@ -27,3 +27,9 @@ describe "OutlineView", ->
expect(rootView.find('.outline-view')).not.toExist()
rootView.trigger 'outline-view:toggle'
expect(rootView.find('.outline-view')).not.toExist()
it "doesn't display when no functions exist", ->
rootView.open(require.resolve('fixtures/sample-with-tabs.coffee'))
expect(rootView.find('.outline-view')).not.toExist()
rootView.trigger 'outline-view:toggle'
expect(rootView.find('.outline-view')).not.toExist()

View File

@ -52,7 +52,7 @@ class OutlineView extends SelectList
column: matches[1].length
name: matches[2]
@setArray(functions)
true
return functions.length > 0
confirmed : ({row, column, name}) ->
@cancel()