Don't add incorrect history state for external links

This commit is contained in:
Andrew Miner
2015-04-04 18:17:15 -07:00
parent f78bd3f8c5
commit b79fa5a148
@@ -63,10 +63,11 @@ module.exports = class BaseController extends Backbone.View
href = $(event.target).attr 'href' href = $(event.target).attr 'href'
href ?= $(event.currentTarget).attr 'href' href ?= $(event.currentTarget).attr 'href'
logger.info "Re-routing link to internal navigation: #{href}" logger.info "Re-routing link to internal navigation: #{href}"
if href? and href.match /^http/ if href? and href.match /^http/
window.location.href = href window.location.href = href
else
router.navigate href, trigger:true router.navigate href, trigger:true
show: (args...)-> show: (args...)->
{$el, callback} = @_resolveShowHideArgs args {$el, callback} = @_resolveShowHideArgs args