Remove unnecessary copy of litegraph objects

This commit is contained in:
filtered
2025-05-12 18:06:10 +10:00
parent 60b7661022
commit c96327e586
2 changed files with 12 additions and 8 deletions

View File

@@ -771,7 +771,8 @@ export class ComfyApp {
// Register the subgraph - adds type wrapper for Litegraph's `createNode` factory
this.graph.events.addEventListener('subgraph-created', (e) => {
try {
useSubgraphService().registerNewSubgraph(e.detail)
const { subgraph, data } = e.detail
useSubgraphService().registerNewSubgraph(subgraph, data)
} catch (err) {
console.error('Failed to register subgraph', err)
useToastStore().add({