misc(v2): prettier

This commit is contained in:
Yangshun Tay 2020-03-24 01:40:18 +08:00
parent a0570e48ac
commit 5813faab32

View file

@ -15,16 +15,16 @@ function normalizeLocation(location) {
pathname: pathnames[location.pathname],
};
}
let pathname = location.pathname || '/';
pathname = pathname.trim().replace(/\/index\.html$/, '');
if (pathname === '') {
pathname = '/';
}
pathnames[location.pathname] = pathname;
return {
...location,
pathname,