Don't add incorrect history state for external links
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user