fix(v2): don't render docs baseUrl because its empty (#1407)

This commit is contained in:
Endi 2019-04-28 23:11:17 +07:00 committed by GitHub
parent ecf1f9a2c4
commit 96cc3dbc88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -43,7 +43,9 @@ async function loadRoutes(pluginsRouteConfigs) {
exact,
} = routeConfig;
addRoutesPath(routePath);
if (!routes) {
addRoutesPath(routePath);
}
// Given an input (object or string), get the import path str
const getModulePath = target => {

View file

@ -14,7 +14,6 @@ describe('loadRoutes', () => {
expect(routesPaths.sort()).toMatchInlineSnapshot(`
Array [
"/",
"/docs",
"/docs/endiliey/permalink",
"/docs/foo/bar",
"/docs/foo/baz",
@ -30,7 +29,6 @@ Array [
expect(routesPaths.sort()).toMatchInlineSnapshot(`
Array [
"/",
"/docs",
"/docs/1.0.0/foo/bar",
"/docs/1.0.0/foo/baz",
"/docs/1.0.0/hello",
@ -52,7 +50,6 @@ Array [
expect(routesPaths.sort()).toMatchInlineSnapshot(`
Array [
"/",
"/docs",
"/docs/en/1.0.0/foo/bar",
"/docs/en/1.0.0/foo/baz",
"/docs/en/1.0.0/hello",
@ -87,7 +84,6 @@ Array [
expect(routesPaths.sort()).toMatchInlineSnapshot(`
Array [
"/",
"/docs",
"/docs/en/endiliey/permalink",
"/docs/en/foo/bar",
"/docs/en/foo/baz",