mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 16:40:05 +00:00
[Cleanup] Reroute and serialisation (#767)
- Fixes root cause of minor in-memory-only corruption when deleting reroutes from output slots - Already automatically corrected via serialisation - If `reroutes` or `links` are empty arrays, removes them from newer object-based serialised output entirely - Minor refactors - Removes unused code - Fixes some serialisation types - Adds `ReadonlyLinkNetwork` interface
This commit is contained in:
@@ -2578,7 +2578,7 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
input.link = null
|
||||
|
||||
// remove the link from the links pool
|
||||
graph._links.delete(link_id)
|
||||
link_info.disconnect(graph)
|
||||
graph._version++
|
||||
|
||||
// link_info hasn't been modified so its ok
|
||||
@@ -2625,7 +2625,7 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
)
|
||||
}
|
||||
// remove the link from the links pool
|
||||
graph._links.delete(link_id)
|
||||
link_info.disconnect(graph)
|
||||
|
||||
this.onConnectionsChange?.(
|
||||
NodeSlotType.OUTPUT,
|
||||
|
||||
Reference in New Issue
Block a user