Fix undefined data TypeError in Blocks (#6536)

* add undefined check

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
Hannah 2023-11-22 11:39:56 +01:00 committed by GitHub
parent f53b01cbfb
commit 1bbd6cab3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/app": patch
"gradio": patch
---
fix:Fix undefined `data` TypeError in Blocks

View File

@ -313,7 +313,7 @@
): Promise<void> {
const outputs = dependencies[fn_index].outputs;
data.forEach((value: any, i: number) => {
data?.forEach((value: any, i: number) => {
const output = instance_map[outputs[i]];
output.props.value_is_output = true;
});