js-proper-url-join
                                
                                 js-proper-url-join copied to clipboard
                                
                                    js-proper-url-join copied to clipboard
                            
                            
                            
                        Path's joined wrong if encoding is disabled
I am trying to join path for the router (which is using path-to-regexp).
const path = properUrlJoin('some-path', '/:id?/:subnav?/:step?', {
    trailingSlash: true,
    queryOptions: {
        encode: false,
    },
})
expected output should be
/some-path/:id?/:subnav?/:step?/
but it results to
/flow/:id/?/:subnav?/:step? 
I guess that’s because ? has a special meaning in the url. It’s being interpreted as a query string.