Remove unnecessary copy of litegraph objects

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

View File

@@ -761,7 +761,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({