Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid the "duplicated promise" error which comes from the vue-router #272

Merged
merged 1 commit into from
Apr 23, 2020

Conversation

David0817
Copy link
Contributor

( fix #252 )

@decentraliser
Copy link
Contributor

isn't it a "NavigationDuplicated" error, as opposed to "duplicated promise"?
try adding a catch block to router.push instead
reference

image

@vincent-lee90
Copy link
Contributor

@decentraliser
try...catch... will not work, becase the root reason is that the promise API.
this will help you [https://github.com/vuejs/vue-router/issues/2881]

@decentraliser
Copy link
Contributor

well, this issue is a regression, so I'm pretty sure it will work

please give it a shot

@click="!currentAccount ? '' : $router.push({name: route.name}).catch(err => {})"

@vincent-lee90
Copy link
Contributor

before i thought that's how you let me is that :

try{
     this.currentAccount && this.$router.push({ name: route.name })
}catch(e){
}

and now
this.currentAccount && this.$router.push({ name: route.name }).catch(err => {})" will work.

@vincent-lee90 vincent-lee90 force-pushed the navigation-duplicated branch 2 times, most recently from a044d13 to 32ccb64 Compare April 22, 2020 12:30
@vincent-lee90
Copy link
Contributor

rebased pr177

@vincent-lee90
Copy link
Contributor

changed

@evias evias added enhancement New feature or request under review and removed changes-needed labels Apr 23, 2020
@evias evias merged commit a1faeab into symbol:master Apr 23, 2020
@evias evias deleted the navigation-duplicated branch April 23, 2020 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request under review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in log when clicking the current menu on the left menu
4 participants