From 21f1579f73495b17e441c91d6978c36f4745c8e0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 1 May 2013 21:47:32 -0700 Subject: [PATCH] Return early when href is a hash --- src/app/window.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/window.coffee b/src/app/window.coffee index c477031d5..b4364401d 100644 --- a/src/app/window.coffee +++ b/src/app/window.coffee @@ -30,7 +30,8 @@ window.setUpEnvironment = -> $(document).on 'click', 'a', (e) -> location = $(e.target).attr('href') - return unless location or location[0] is '#' + return unless location + return if location[0] is '#' if location.indexOf('https://') is 0 or location.indexOf('http://') is 0 require('child_process').spawn('open', [location]) if location