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

Route null on navigation - While using children routes #1227

Closed
epozsh opened this issue Apr 17, 2017 · 4 comments
Closed

Route null on navigation - While using children routes #1227

epozsh opened this issue Apr 17, 2017 · 4 comments
Labels

Comments

@epozsh
Copy link

epozsh commented Apr 17, 2017

I downloaded react-starter-kit intl with upgraded version and i get error with route null.
I was using previus version with webpack v1.And there is working well!
As i test using keyword debugger the error happen in routes with children, because 1st it goes to this code

code 1st
 async action({ next }) {
    // Execute each child route until one of them return the result
    const route = await next(); //null

    // Provide default values for title, description etc.
    route.title = `${route.title || 'Untitled Page'} - www.reactstarterkit.com`;
    route.description = route.description || '';

    return route;
  },

and after that it goes here

code2ond
export default {
  path: '/news',
  children: [
    {
      path: '/',
      async action({ path, store }) {
      return .....
     },
     {
      path: '*',
      async action({ path, store }) {
      return .....
     },
 ]

but it should be backwards. code2nd -> code1st.
Am i missing something with this new version?

@frenzzy
Copy link
Member

frenzzy commented Apr 18, 2017

Try to use next(true) as a temporary solution

@langpavel
Copy link
Collaborator

@frenzzy Do you have a sketch for fixing this?

@frenzzy
Copy link
Member

frenzzy commented Apr 20, 2017

Yes, here: kriasoft/universal-router#91

@langpavel langpavel added the bug label Apr 20, 2017
@frenzzy
Copy link
Member

frenzzy commented Apr 27, 2017

Fixed in universal-router v3.1.0 and updated in #1237

@frenzzy frenzzy closed this as completed Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants