Closed george-gca closed 10 months ago
Hey @george-gca,
thanks for opening this PR. Two things:
resolveAssetUrl()
should also cover the case when baseUrl
has no trailing slash and url
has no leading slash.I'll push a change and would appreciate your help testing it.
Since url
can also be an external url, added support for this case. It seems to be working fine now.
I've now decided on following: local asset URLs are assumed to begin with a leading slash, if they don't, they are assumed to link externally. I refrained from adding logic to really detect external URLs because I assume there will be edge cases.
So, this PR only makes resolveAssetUrl
safe for base URL with or without trailing slash.
Fixes #14