@devtron-labs/devtron-fe-common-lib 0.0.49 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -671,8 +671,8 @@ function fetchInTime(url, type, data, options, isMultipartRequest) {
671
671
  var controller = new AbortController();
672
672
  var signal = controller.signal;
673
673
  var timeoutPromise = new Promise(function (resolve, reject) {
674
- var _a, _b;
675
- var requestTimeout = (_b = (_a = window === null || window === void 0 ? void 0 : window._env_) === null || _a === void 0 ? void 0 : _a.GLOBAL_API_TIMEOUT) !== null && _b !== void 0 ? _b : FALLBACK_REQUEST_TIMEOUT;
674
+ var _a;
675
+ var requestTimeout = ((_a = window === null || window === void 0 ? void 0 : window._env_) === null || _a === void 0 ? void 0 : _a.GLOBAL_API_TIMEOUT) || FALLBACK_REQUEST_TIMEOUT;
676
676
  var timeout = (options === null || options === void 0 ? void 0 : options.timeout) ? options.timeout : requestTimeout;
677
677
  setTimeout(function () {
678
678
  controller.abort();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/Common/Api.ts CHANGED
@@ -176,7 +176,7 @@ function fetchInTime(
176
176
  const controller = new AbortController()
177
177
  const { signal } = controller
178
178
  const timeoutPromise: Promise<ResponseType> = new Promise((resolve, reject) => {
179
- const requestTimeout = (window as any)?._env_?.GLOBAL_API_TIMEOUT ?? FALLBACK_REQUEST_TIMEOUT
179
+ const requestTimeout = (window as any)?._env_?.GLOBAL_API_TIMEOUT || FALLBACK_REQUEST_TIMEOUT
180
180
  const timeout = options?.timeout ? options.timeout : requestTimeout
181
181
 
182
182
  setTimeout(() => {