mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
Clears the reroutes in extras when exporting for serialisation, if none exist. - Resolves #346
This commit is contained in:
@@ -1472,13 +1472,13 @@ export class LGraph implements LinkNetwork, Serialisable<SerialisableGraph> {
|
||||
const links = linkArray.map(x => x.serialize())
|
||||
|
||||
if (reroutes.length) {
|
||||
extra.reroutes = reroutes
|
||||
|
||||
// Link parent IDs cannot go in 0.4 schema arrays
|
||||
extra.linkExtensions = linkArray
|
||||
.filter(x => x.parentId !== undefined)
|
||||
.map(x => ({ id: x.id, parentId: x.parentId }))
|
||||
}
|
||||
|
||||
extra.reroutes = reroutes.length ? reroutes : undefined
|
||||
return {
|
||||
last_node_id: state.lastNodeId,
|
||||
last_link_id: state.lastLinkId,
|
||||
|
||||
Reference in New Issue
Block a user