-
Notifications
You must be signed in to change notification settings - Fork 960
Open
Description
During the transition to typescript, createPath
function has changed from this:
function createPath(location) {
var pathname = location.pathname,
search = location.search,
hash = location.hash;
var path = pathname || '/';
if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
return path;
}
to this
export function createPath({
pathname = '/',
search = '',
hash = ''
}: PartialPath) {
return pathname + search + hash;
}
You are no longer ensuring that passed search
and hash
are prefixed, which kind of broke our site.
You should either restore the old behavior or document the breaking change.
StringEpsilon, onionhammer and fujiechen
Metadata
Metadata
Assignees
Labels
No labels