diff --git a/src/scripts/api.ts b/src/scripts/api.ts index 6f098aef4..8a26379ee 100644 --- a/src/scripts/api.ts +++ b/src/scripts/api.ts @@ -420,7 +420,8 @@ export class ComfyApi extends EventTarget { */ async getCoreWorkflowTemplates(): Promise { const res = await axios.get('/templates/index.json') - return res.status === 200 ? res.data : [] + const contentType = res.headers['content-type'] + return contentType?.includes('application/json') ? res.data : [] } /**