mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 06:44:32 +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') {
|
||||
// Default templates provided by frontend are served as static files
|
||||
const response = await fetch(api.fileURL(`/templates/${id}.json`))
|
||||
return response.json()
|
||||
return await response.json()
|
||||
} else {
|
||||
// Custom node templates served via API
|
||||
const response = await api.fetchApi(
|
||||
`/workflow_templates/${sourceModule}/${id}.json`
|
||||
)
|
||||
return response.json()
|
||||
return await response.json()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user