Fix TypeError when Blocks outputs parameter is set to None (#3883)

* Fix TypeError when Blocks outputs parameter is set to None

* Update changelog

---------

Co-authored-by: Dawood Khan <dawoodkhan82@gmail.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
This commit is contained in:
DavG25 2023-04-19 22:41:49 +02:00 committed by GitHub
parent ae30e5f292
commit 9d7fde4f16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -28,6 +28,7 @@ No changes to highlight.
- Add DESCRIPTION.md to image_segmentation demo by [@aliabd](https://github.com/aliabd) in [PR 3866](https://github.com/gradio-app/gradio/pull/3866)
- Fix error in running `gr.themes.builder()` by [@deepkyu](https://github.com/deepkyu) in [PR 3869](https://github.com/gradio-app/gradio/pull/3869)
- Fixed a JavaScript TypeError when loading custom JS with `_js` and setting `outputs` to `None` in `gradio.Blocks()` by [@DavG25](https://github.com/DavG25) in [PR 3883](https://github.com/gradio-app/gradio/pull/3883)
## Contributors Shoutout:

View File

@ -211,7 +211,7 @@
function handle_update(data: any, fn_index: number) {
const outputs = dependencies[fn_index].outputs;
data.forEach((value: any, i: number) => {
data?.forEach((value: any, i: number) => {
if (
typeof value === "object" &&
value !== null &&