Skip to content

Commit

Permalink
remove async
Browse files Browse the repository at this point in the history
  • Loading branch information
endiliey committed Oct 29, 2019
1 parent 2f8d161 commit 9b02409
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions packages/docusaurus-plugin-content-blog/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,22 +285,20 @@ export default function pluginContentBlog(
}),
);

await Promise.all(
blogItems.map(async blogItem => {
const {metadata, metadataPath} = blogItem;
const {source, permalink} = metadata;
blogItems.map(blogItem => {
const {metadata, metadataPath} = blogItem;
const {source, permalink} = metadata;

addRoute({
path: permalink,
component: blogPostComponent,
exact: true,
modules: {
content: source,
metadata: aliasedSource(metadataPath),
},
});
}),
);
addRoute({
path: permalink,
component: blogPostComponent,
exact: true,
modules: {
content: source,
metadata: aliasedSource(metadataPath),
},
});
});

// Create routes for blog's paginated list entries.
await Promise.all(
Expand Down

0 comments on commit 9b02409

Please sign in to comment.