Foxhound
Foxhound copied to clipboard
no menu appears
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
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