Skip to content

Commit

Permalink
fix: resolving issue when attempting to build server-side
Browse files Browse the repository at this point in the history
  • Loading branch information
zstix committed Jun 2, 2020
1 parent de2fe35 commit ca869a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/templates/ReferenceTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const ReferenceTemplate = ({ data }) => {
const { frontmatter } = mdx;
const { title, description, component } = frontmatter;

if (typeof window === 'undefined') global.window = {};
const componentData = window?.__NR1_SDK__?.default?.[component];

return (
Expand Down

0 comments on commit ca869a1

Please sign in to comment.