mirror of
https://github.com/atom/atom.git
synced 2026-02-17 10:01:25 -05:00
Return early when href is a hash
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user