fridays / next-routes

Universal dynamic routes for Next.js
MIT License
2.47k stars 230 forks source link

Empty value for route #331

Closed yevhen-logosha closed 1 year ago

yevhen-logosha commented 4 years ago

Guys, running "next-routes": "^1.4.2". How can I do the following without an Error: <Link route={condition ? 'profile': ''} params={condition ? {profileID: 123} : {}}

Code above throws Uncaught TypeError: Cannot read property 'trim' of undefined. How to make it to NOT navigate to anywhere if condition is false

Was looking everywhere, Many thanks!