Fix 4 bugs from third code review
- Fix delete_proj not persisting cleared current_project to config: page reload after deleting active project restored deleted name, silently breaking all DB sync - Fix sync_to_db crash on non-dict batch_data items: add isinstance guard matching import_json_file - Fix output_types ignored in load_dynamic: parse declared types and use to_int()/to_float() to coerce values, so downstream ComfyUI nodes receive correct types even when API returns strings - Fix backward-compat comma-split for types not trimming whitespace: legacy workflows with "STRING, INT" got types " INT" breaking ComfyUI connection type-matching Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -154,7 +154,7 @@ app.registerExtension({
|
||||
let types = [];
|
||||
if (otWidget?.value) {
|
||||
try { types = JSON.parse(otWidget.value); } catch (_) {
|
||||
types = otWidget.value.split(",");
|
||||
types = otWidget.value.split(",").map(t => t.trim()).filter(Boolean);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ app.registerExtension({
|
||||
// On load, LiteGraph already restored serialized outputs with links.
|
||||
// Rename and set types to match stored state (preserves links).
|
||||
for (let i = 0; i < this.outputs.length && i < keys.length; i++) {
|
||||
this.outputs[i].name = keys[i].trim();
|
||||
this.outputs[i].name = keys[i];
|
||||
if (types[i]) this.outputs[i].type = types[i];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user