if path exists

This commit is contained in:
Chris Wanstrath
2011-11-12 16:04:07 -08:00
parent f2134035ac
commit 223f46fd95

View File

@@ -22,10 +22,12 @@ class TabsPane extends Pane
false
nextTab: ->
window.open $('#tabs ul .active').next().data 'path'
if path = $('#tabs ul .active').next().data 'path'
window.open path
prevTab: ->
window.open $('#tabs ul .active').prev().data 'path'
if path = $('#tabs ul .active').prev().data 'path'
window.open path
switchToTab: (tab) ->
tab = $("#tabs ul li").get(tab - 1) if _.isNumber tab