From b6f6f1b2a8242642944d6f1cd1034cbe5f05f129 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Wed, 7 Jun 2017 16:56:07 +0100 Subject: [PATCH] fix(joyent-cp-frontend): fix fallback gql hostname --- packages/cp-frontend/src/state/store.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cp-frontend/src/state/store.js b/packages/cp-frontend/src/state/store.js index 9d3149fa..15056655 100644 --- a/packages/cp-frontend/src/state/store.js +++ b/packages/cp-frontend/src/state/store.js @@ -8,11 +8,12 @@ const GLOBAL = typeof window === 'object' ? window : { location: { - hostname: 'http://0.0.0.0' + hostname: '0.0.0.0' } }; -const GQL_HOSTNAME = process.env.REACT_APP_GQL_HOSTNAME || GLOBAL; +const GQL_HOSTNAME = + process.env.REACT_APP_GQL_HOSTNAME || GLOBAL.location.hostname; export const client = new ApolloClient({ dataIdFromObject: o => {