prostgles-client 4.0.274 → 4.0.275

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useAsyncEffectQueue.d.ts","sourceRoot":"","sources":["../../lib/hooks/useAsyncEffectQueue.ts"],"names":[],"mappings":"AAKA,KAAK,UAAU,GAAG,MAAM,OAAO,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;AAOrD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,WAAY,UAAU,QAAQ,GAAG,EAAE,SAmDlE,CAAC"}
1
+ {"version":3,"file":"useAsyncEffectQueue.d.ts","sourceRoot":"","sources":["../../lib/hooks/useAsyncEffectQueue.ts"],"names":[],"mappings":"AAKA,KAAK,UAAU,GAAG,MAAM,OAAO,CAAC,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;AAQrD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,WAAY,UAAU,QAAQ,GAAG,EAAE,SAmDlE,CAAC"}
@@ -13,7 +13,7 @@ const useAsyncEffectQueue = (effect, deps) => {
13
13
  const newEffect = (0, reactImports_1.useRef)();
14
14
  const activeEffect = (0, reactImports_1.useRef)();
15
15
  const onRender = async () => {
16
- var _a;
16
+ var _a, _b;
17
17
  /**
18
18
  * Await and cleanup previous effect
19
19
  * */
@@ -21,12 +21,12 @@ const useAsyncEffectQueue = (effect, deps) => {
21
21
  const { cleanup, effect, id } = activeEffect.current;
22
22
  activeEffect.current = { id, state: "cleaning", effect };
23
23
  await cleanup().catch(console.error);
24
- activeEffect.current = undefined;
24
+ activeEffect.current = { id, state: "cleaned", effect };
25
25
  }
26
26
  /**
27
27
  * Start new effect
28
28
  */
29
- if (newEffect.current && !activeEffect.current) {
29
+ if (newEffect.current && ((_b = activeEffect.current) === null || _b === void 0 ? void 0 : _b.effect) !== newEffect.current.effect) {
30
30
  const currentEffect = newEffect.current;
31
31
  const { effect, id } = currentEffect;
32
32
  activeEffect.current = { id, state: "resolving", effect };