Wildcard: fix createLinkUrl implementation
Loading
Created by: oleggromov
In a recent PR refactoring Link components we introduced createLinkUrl
function so that Link users create URL strings themselves. This worked fine but unfortunately, led to bugs such this one because history
's implementation of createPath
thinks that empty pathname == '/'
.
This isn't what we expect when there's no absolute path, similar to <a href='#section'>...</a>
, which is a relative URL.
Fix the createLinkUrl implementation and add tests.
sg start web-standalone
/#hash
but relative to the current page URL + hash.Check out the client app preview documentation to learn more.