Support number/text ids when importing API JSON (#1952)

* support numeric/text ids
This commit is contained in:
pythongosssss 2023-11-12 19:49:23 +00:00 committed by GitHub
parent 4781819a85
commit 4aeef781a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1863,7 +1863,7 @@ export class ComfyApp {
for (const id of ids) {
const data = apiData[id];
const node = LiteGraph.createNode(data.class_type);
node.id = id;
node.id = isNaN(+id) ? id : +id;
graph.add(node);
}