Exception in rendering!

Message: location is not defined

ReferenceError: location is not defined
    at BlockBase (webpack:///./app/assets/packs/react-ssr.js_+_636_modules?:24285:3331)
    at eval (webpack:///./node_modules/mobx-react-lite/es/index.js_+_12_modules?:355:14)
    at useObserver (webpack:///./node_modules/mobx-react-lite/es/index.js_+_12_modules?:229:12)
    at BlockBase (webpack:///./node_modules/mobx-react-lite/es/index.js_+_12_modules?:354:12)
    at d (webpack:///./node_modules/react-dom/cjs/react-dom-server.browser.production.min.js?:649:28)
    at Za (webpack:///./node_modules/react-dom/cjs/react-dom-server.browser.production.min.js?:696:5)
    at a.b.render (webpack:///./node_modules/react-dom/cjs/react-dom-server.browser.production.min.js?:855:9)
    at a.b.read (webpack:///./node_modules/react-dom/cjs/react-dom-server.browser.production.min.js?:828:23)
    at Object.renderToString (webpack:///./node_modules/react-dom/cjs/react-dom-server.browser.production.min.js?:1167:16)
    at Object.serverRenderReactComponent [as default] (webpack:///./node_modules/react-on-rails/node_package/lib/serverRenderReactComponent.js?:73:39)
    at Object.serverRenderReactComponent (webpack:///./node_modules/react-on-rails/node_package/lib/ReactOnRails.js?:253:48)
    at <anonymous>:6:31
    at <anonymous>:13:11