cyclejs-community / cyclic-router

Router Driver built for Cycle.js
MIT License
109 stars 24 forks source link

createHref doesn't behave as expected #213

Open ntilwalli opened 6 years ago

ntilwalli commented 6 years ago

I'm posting this as a note of something to possibly update in the future...

The code for path never allows an empty string to be added to the _namespace meaning when trying to construct a path using join there is never a scenario where a '/' is the first character so all constructed paths are relative. In my app I want all the paths to be absolute from root so the createHref functionality feels broken. I'm doing [""].concat(Router._namespace).join('/') directly in my code to create the current relative path. I feel likecreateHref should be changed to use that approach.