Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jun 22, 2021
1 parent a0b495a commit 548fa95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ describe('simple website', () => {
test('configureWebpack', async () => {
const {plugin} = await loadSite();

const content = await plugin.loadContent?.();

const config = applyConfigureWebpack(
plugin.configureWebpack,
{
Expand All @@ -320,7 +322,7 @@ describe('simple website', () => {
},
false,
undefined,
{content: 42},
content,
);
const errors = validate(config);
expect(errors).toBeUndefined();
Expand Down
4 changes: 1 addition & 3 deletions packages/docusaurus-plugin-content-docs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,7 @@ export default function pluginContentDocs(
} = options;

function getSourceToPermalink(): SourceToPermalink {
const allDocs = content.loadedVersions.flatMap(
(version) => version.docs,
);
const allDocs = flatten(content.loadedVersions.map((v) => v.docs));
return mapValues(
keyBy(allDocs, (d) => d.source),
(d) => d.permalink,
Expand Down

0 comments on commit 548fa95

Please sign in to comment.