gatsby-attainlabs-cms 1.0.29 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/gatsby-node.js +10 -3
  2. package/package.json +1 -1
package/gatsby-node.js CHANGED
@@ -32,9 +32,16 @@ const generatePage = async (blocks, layout, isNested) => {
32
32
 
33
33
 
34
34
  export const Head = ({ pageContext }: any) => {
35
- const blocks = pageContext.blocks || { root: { props: { meta: {} } } };
36
- const { title, description } = blocks.root.props.meta;
37
- return <SEO title={title || ""} description={description || ""} noIndex={true} />;
35
+ const blocks = pageContext.blocks;
36
+ const meta = blocks.root.props.meta;
37
+ const { title, description } = blocks.root.props.meta;
38
+ return (
39
+ <SEO
40
+ title={meta ? meta.title : ""}
41
+ description={meta ? meta.description : ""}
42
+ noIndex={true}
43
+ />
44
+ );
38
45
  };
39
46
 
40
47
  const Page = ({pageContext}:any ) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-attainlabs-cms",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",