Skip to content

Conversation

@billouboq
Copy link
Contributor

@billouboq billouboq commented Oct 7, 2016

Issue #725

I might be wrong but I think this.transitionTo(getHash()) fire the 'hashchange' event, so if next is not called synchronously in beforeEnter function, the second call to transitionTo will trigger beforeEnter again.

Dunno if it's better but we can use setTimeout to deferrer the hashchanged listener, works too.

ensureSlash()
this.transitionTo(getHash())

setTimeout(() => {
    window.addEventListener('hashchange', () => {
        this.onHashChange()
    })
}, 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants