From a3028127b8683be957fe30e5019f09c61032981f Mon Sep 17 00:00:00 2001 From: Mike Allanson Date: Wed, 20 Jun 2018 22:43:05 +0100 Subject: [PATCH] Fix `window is not defined` error during build __PATH_PREFIX__ is always defined now, so checking for __PREFIX_PATHS__ isn't necessary any more. This fixes `gatsby build` for this branch. --- src/components/layout.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/layout.js b/src/components/layout.js index 55a22d0..e0222fd 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -6,16 +6,9 @@ import { rhythm, scale } from '../utils/typography' class Template extends React.Component { render() { const { location, children } = this.props + const rootPath = `${__PATH_PREFIX__}/` let header - let rootPath = `/` - if ( - typeof window.__PREFIX_PATHS__ !== `undefined` && - window.__PREFIX_PATHS__ - ) { - rootPath = window.__PATH_PREFIX__ + `/` - } - if (location.pathname === rootPath) { header = (