Skip to content

Commit

Permalink
blog post build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-irigoyen committed Feb 3, 2022
1 parent 16db5f0 commit 146e335
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/blogTemplates/blogPost.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,16 @@ const Btn = styled(Button)`
export default function Post({ data: {allMarkdownRemark: { edges }} }) {
deckDeckGoHighlightElement();
const intl = useIntl();
let post = edges[0].node.frontmatter;
let post = {};
let html = "";
if (edges[0]) {
post = edges[0].node.frontmatter
} else {
return (
<PostContainer>
</PostContainer>
)
}
const postFiqus = edges.forEach((e) => {
const { frontmatter: p } = e.node;
if (p.lang === intl.locale) {
Expand Down

0 comments on commit 146e335

Please sign in to comment.