diff --git a/src/global-methods.js b/src/global-methods.js index a0023ef4c..788d4c2e4 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -5,7 +5,7 @@ import httpStatusCodes from "http-status-codes"; export default { callHttpClient({ method, endpoint, payload }) { return new Promise((resolve, reject) => { - var apiGatewayUrl = applicationConfig.CONSUMER_APIGATEWAY_URL; + const apiGatewayUrl = applicationConfig.CONSUMER_APIGATEWAY_URL; const payloadAndAnalyticsData = Object.assign({}, payload, { AppName: "FixMyGlass", }); @@ -19,7 +19,7 @@ export default { }).then( (response) => { if (response.status == httpStatusCodes.OK) { - if(response.data == undefined || response.data == {}) { + if(response.data == undefined) { reject(response); }else{ resolve(response);