diff --git a/webpack/production.js b/webpack/production.js index 220ed8991..37a1a4397 100644 --- a/webpack/production.js +++ b/webpack/production.js @@ -104,7 +104,11 @@ module.exports = merge(sharedConfig, { ]; const isBackendRoute = ({ pathname }) => { - return backendRoutes.some(pathname.startsWith); + if (pathname) { + return backendRoutes.some(pathname.startsWith); + } else { + return false; + } }; return isBackendRoute(requestUrl) && requestUrl;