fix(joyent-cp-frontend): fix fallback gql hostname

This commit is contained in:
Sérgio Ramos 2017-06-07 16:56:07 +01:00
parent ebec51b965
commit b6f6f1b2a8

View File

@ -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 => {