mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
Add back/forwards compatibility to schema validation (#1501)
* Allow future extensions of added schema objects * Add explicit versioning to zod schemas * Extend schema 0.4 with new fields in extras - Allows Reroutes without using schema v1 - Reroute data is retained when using old versions - simply not displayed * Add Reroute undo/redo support
This commit is contained in:
@@ -395,8 +395,11 @@ export class ChangeTracker {
|
||||
return false
|
||||
}
|
||||
|
||||
// Reroutes (schema 0.4)
|
||||
if (!_.isEqual(a.extra?.reroutes, b.extra?.reroutes)) return false
|
||||
|
||||
// Compare other properties normally
|
||||
for (const key of ['links', 'groups']) {
|
||||
for (const key of ['links', 'reroutes', 'groups']) {
|
||||
if (!_.isEqual(a[key], b[key])) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user