From 223f46fd952a2ff969b69494a263160f122d0a91 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sat, 12 Nov 2011 16:04:07 -0800 Subject: [PATCH] if path exists --- extensions/tabs/tabs-pane.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/tabs/tabs-pane.coffee b/extensions/tabs/tabs-pane.coffee index cec7285f2..ad1358a9a 100644 --- a/extensions/tabs/tabs-pane.coffee +++ b/extensions/tabs/tabs-pane.coffee @@ -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