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

no menu appears #128

Open
qurtopianodesign opened this issue May 17, 2018 · 1 comment
Open

no menu appears #128

qurtopianodesign opened this issue May 17, 2018 · 1 comment

Comments

@qurtopianodesign
Copy link

qurtopianodesign commented May 17, 2018

hi, I have a problem with the menu, I get an error in the console of this type: Uncaught TypeError: "Can not read property 'pathname' of undefined at Function.mapToProps",

the problem is in index.jsx
export default connect( state => {
const path = FoxhoundSettings.URL.path || '/';
const menu = getMenu( state, 'primary' );
return {
currentPage: state.routing.locationBeforeTransitions.pathname || path, <------- here
menu: menu || [],
};
} )( Navigation );

what can I do to solve it?

thank you
regards

@JFernandoGomez
Copy link

seems that react-router changed the way to access the pathname, @qurtopianodesign change locationBeforeTransitions.pathname to location.pathname it worked for me

check:
https://github.com/reactjs/react-router-redux#how-do-i-access-router-state-in-a-container-component

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

No branches or pull requests

2 participants