mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
misc(v2): prettier
This commit is contained in:
parent
a0570e48ac
commit
5813faab32
1 changed files with 4 additions and 4 deletions
|
@ -15,16 +15,16 @@ function normalizeLocation(location) {
|
||||||
pathname: pathnames[location.pathname],
|
pathname: pathnames[location.pathname],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let pathname = location.pathname || '/';
|
let pathname = location.pathname || '/';
|
||||||
pathname = pathname.trim().replace(/\/index\.html$/, '');
|
pathname = pathname.trim().replace(/\/index\.html$/, '');
|
||||||
|
|
||||||
if (pathname === '') {
|
if (pathname === '') {
|
||||||
pathname = '/';
|
pathname = '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
pathnames[location.pathname] = pathname;
|
pathnames[location.pathname] = pathname;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...location,
|
...location,
|
||||||
pathname,
|
pathname,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue