We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Uncaught (in promise) undefined
3.1.2
http://jsrun.pro/cdbKp/edit
next({ path: to.path, query: to.query });
no error
Uncaught (in promise) undefined in the console
How to avoid such error?
The text was updated successfully, but these errors were encountered:
function getKey(src) { return src.replace(/[xy]/g, function (c) { let r = (Math.random() * 16) | 0; let v = c === 'x' ? r : (r & 0x3) | 0x8; return v.toString(16); }); } router.beforeEach((to, from, next) => { if (!to.query['test']) { to.query['test'] = getKey('xxxxxxxx'); next({ path: to.path, query: to.query }); } else { // here will console `Uncaught (in promise) undefined` next(); } });
Sorry, something went wrong.
see #2873
Note that in your repro you are always pushing to /foo. Everything is explained in the comments linked in that issue response
/foo
@posva thank you for your explain. I have known I next() one route twice. And I just want to add some query , do you have any better way to do?
next()
No branches or pull requests
Version
3.1.2
Reproduction link
http://jsrun.pro/cdbKp/edit
Steps to reproduce
Uncaught (in promise) undefined
in the consoleWhat is expected?
no error
What is actually happening?
Uncaught (in promise) undefined
in the consoleHow to avoid such error?
The text was updated successfully, but these errors were encountered: