Fix spaces load error (#8415)

* changes

* add changeset

* changes

---------

Co-authored-by: Ali Abid <aliabid94@gmail.com>
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
aliabid94 2024-05-30 13:52:50 -07:00 committed by GitHub
parent b67f7ff8f9
commit 227de35298
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
"@gradio/client": minor
"gradio": minor
---
feat:Fix spaces load error

View File

@ -101,6 +101,11 @@ export async function resolve_config(
let config = await response.json();
config.path = config.path ?? "";
config.root = endpoint;
config.dependencies?.forEach((dep: any, i: number) => {
if (dep.id === undefined) {
dep.id = i;
}
});
return config;
} else if (response?.status === 401) {
throw new Error(UNAUTHORIZED_MSG);