You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
other (Please do not submit support requests here (below))
When using an action and calling context.next() with child routes, a TypeError is thrown if the route does not exist. I expected a route not found error to be thrown.
constrouter=newUniversalRouter({path: '/',asyncaction({ next }){console.log('middleware: start');constchild=awaitnext();console.log('middleware: end');returnchild;},children: [{path: '/hello',action(){console.log('route: return a result');return'Hello, world!';}}]});router.resolve('/hello/404');
universal-router.js:439 Uncaught (in promise) TypeError: Cannot read property 'route' of undefined
at next (VM173 universal-router.js:439)
at VM173 universal-router.js:462
If you comment out the action middleware, you get the expected error message
Uncaught (in promise) Error: Route not found
at next (VM173 universal-router.js:451)
at VM173 universal-router.js:462
I still get the TypeError if I add a fallback route using '*'. Without the action middleware and with a fallback, the fallback route is correctly returned and no error is thrown.
The text was updated successfully, but these errors were encountered:
I'm submitting a ...
When using an action and calling
context.next()
with child routes, a TypeError is thrown if the route does not exist. I expected a route not found error to be thrown.https://jsbin.com/zicukiyoxu/1/edit?html,output
If you comment out the action middleware, you get the expected error message
I still get the TypeError if I add a fallback route using
'*'
. Without the action middleware and with a fallback, the fallback route is correctly returned and no error is thrown.The text was updated successfully, but these errors were encountered: