@apotech-os/ui-sdk 3.0.1 → 3.0.2

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.cjs CHANGED
@@ -160,12 +160,14 @@ function useAppRun(runId, opts = {}) {
160
160
  const requestId = ++requestIdRef.current;
161
161
  try {
162
162
  const loaded = await clientRef.current.get(path);
163
- if (requestId !== requestIdRef.current || !isMountedRef.current) return { kind: "superseded" };
163
+ if (requestId !== requestIdRef.current || !isMountedRef.current)
164
+ return { kind: "superseded" };
164
165
  setRun(loaded);
165
166
  setError(void 0);
166
167
  return { kind: "success", run: loaded };
167
168
  } catch (err) {
168
- if (requestId !== requestIdRef.current || !isMountedRef.current) return { kind: "superseded" };
169
+ if (requestId !== requestIdRef.current || !isMountedRef.current)
170
+ return { kind: "superseded" };
169
171
  setError(err);
170
172
  return { kind: "error", err };
171
173
  }
@@ -254,12 +256,14 @@ function useAppRuns(opts) {
254
256
  path,
255
257
  JSON.parse(paramsKey)
256
258
  );
257
- if (requestId !== requestIdRef.current || !isMountedRef.current) return { kind: "superseded" };
259
+ if (requestId !== requestIdRef.current || !isMountedRef.current)
260
+ return { kind: "superseded" };
258
261
  setRuns(page.items);
259
262
  setError(void 0);
260
263
  return { kind: "success", items: page.items };
261
264
  } catch (err) {
262
- if (requestId !== requestIdRef.current || !isMountedRef.current) return { kind: "superseded" };
265
+ if (requestId !== requestIdRef.current || !isMountedRef.current)
266
+ return { kind: "superseded" };
263
267
  setError(err);
264
268
  return { kind: "error", err };
265
269
  } finally {