Closed ucarion closed 4 years ago
Ah, also -- thanks for making this library. Truly an excellent piece of software. This issue is not at all pressing on my end, as I've found that URI.js seems to work better when I pass things around as strings than as URIComponents.
You're welcome.
Having looked into this, the issue is that parsing a URN does not return the typical parts of a component, such as a path. Which is what resolveComponents
is looking for but is not finding. In short, resolveComponents
can not handle URN components.
You are better off using resolve
instead of resolveComponents
because it can handle this situation since it disables scheme specific parsing.
The following code:
Outputs:
This seems like a bug, but perhaps I'm making an illogical request? This almost certainly seems related to: #26, although here it's with
resolveComponents
instead.Runkit: https://runkit.com/embed/mf9pa43k4y9z