@gradio/client 0.4.0 → 0.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @gradio/client
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Fixes
6
+
7
+ - [#5705](https://github.com/gradio-app/gradio/pull/5705) [`78e7cf516`](https://github.com/gradio-app/gradio/commit/78e7cf5163e8d205e8999428fce4c02dbdece25f) - ensure internal data has updated before dispatching `success` or `then` events. Thanks [@pngwn](https://github.com/pngwn)!
8
+
3
9
  ## 0.4.0
4
10
 
5
11
  ### Features
package/dist/index.js CHANGED
@@ -379,8 +379,8 @@ function api_factory(fetch_implementation) {
379
379
  rej(status);
380
380
  if (status.stage === "complete") {
381
381
  status_complete = true;
382
- app.destroy();
383
382
  if (data_returned) {
383
+ app.destroy();
384
384
  res2(result);
385
385
  }
386
386
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/client",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Gradio API client",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/client.ts CHANGED
@@ -379,9 +379,9 @@ export function api_factory(fetch_implementation: typeof fetch): Client {
379
379
  if (status.stage === "error") rej(status);
380
380
  if (status.stage === "complete") {
381
381
  status_complete = true;
382
- app.destroy();
383
382
  // if complete message comes after data, resolve here
384
383
  if (data_returned) {
384
+ app.destroy();
385
385
  res(result);
386
386
  }
387
387
  }