@react-pakistan/util-functions 1.24.31 → 1.24.32

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.
@@ -94,7 +94,7 @@ var useFetch = function (url, config, deps) {
94
94
  };
95
95
  }, []);
96
96
  var fetchNow = (0, react_1.useCallback)(function (overrideUrl, overrideOptions) { return __awaiter(void 0, void 0, void 0, function () {
97
- var finalUrl, finalOptions, controller, response, result, err_1;
97
+ var finalUrl, finalOptions, controller, condition, response, result, err_1;
98
98
  return __generator(this, function (_a) {
99
99
  switch (_a.label) {
100
100
  case 0:
@@ -106,10 +106,12 @@ var useFetch = function (url, config, deps) {
106
106
  controller = new AbortController();
107
107
  abortControllerRef.current = controller;
108
108
  finalOptions.signal = controller.signal;
109
+ condition = Object.values(finalOptions).every(function (val) { return !!val; });
110
+ console.log('_>>>', condition, finalOptions);
109
111
  _a.label = 1;
110
112
  case 1:
111
113
  _a.trys.push([1, 5, 6, 7]);
112
- if (!Object.values(defaultOptions).every(function (val) { return !!val; })) return [3 /*break*/, 4];
114
+ if (!condition) return [3 /*break*/, 4];
113
115
  return [4 /*yield*/, fetch(finalUrl, finalOptions)];
114
116
  case 2:
115
117
  response = _a.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.24.31",
3
+ "version": "1.24.32",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {