mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
[fix] Add missing await for response.json() calls in template workflows
This commit is contained in:
@@ -162,13 +162,13 @@ export function useTemplateWorkflows() {
|
|||||||
if (sourceModule === 'default') {
|
if (sourceModule === 'default') {
|
||||||
// Default templates provided by frontend are served as static files
|
// Default templates provided by frontend are served as static files
|
||||||
const response = await fetch(api.fileURL(`/templates/${id}.json`))
|
const response = await fetch(api.fileURL(`/templates/${id}.json`))
|
||||||
return response.json()
|
return await response.json()
|
||||||
} else {
|
} else {
|
||||||
// Custom node templates served via API
|
// Custom node templates served via API
|
||||||
const response = await api.fetchApi(
|
const response = await api.fetchApi(
|
||||||
`/workflow_templates/${sourceModule}/${id}.json`
|
`/workflow_templates/${sourceModule}/${id}.json`
|
||||||
)
|
)
|
||||||
return response.json()
|
return await response.json()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user