Skip to content

Commit 8fec33c

Browse files
committed
fix example build
1 parent ba86f24 commit 8fec33c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

gatsby-node.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ async function createExamples(actions, graphql) {
306306
filter: {
307307
sourceInstanceName: { eq: "examples" }
308308
extension: { eq: "json" }
309+
relativeDirectory: { regex: "/^((?!data).)*$/" }
309310
}
310311
) {
311312
edges {

src/templates/examples/example.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const ExampleTemplate = ({ data, pageContext }) => {
106106
__html: example.description
107107
}}></p>
108108
</div>
109-
{example.featured.length > 0 && (
109+
{example.featured && example.featured.length > 0 && (
110110
<FeaturedFunctions
111111
featured={example.featured}
112112
heading={intl.formatMessage({ id: 'featured' })}

0 commit comments

Comments
 (0)