Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
4aeef781
Unverified
Commit
4aeef781
authored
Nov 12, 2023
by
pythongosssss
Committed by
GitHub
Nov 12, 2023
Browse files
Support number/text ids when importing API JSON (#1952)
* support numeric/text ids
parent
4781819a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
web/scripts/app.js
web/scripts/app.js
+1
-1
No files found.
web/scripts/app.js
View file @
4aeef781
...
@@ -1863,7 +1863,7 @@ export class ComfyApp {
...
@@ -1863,7 +1863,7 @@ export class ComfyApp {
for
(
const
id
of
ids
)
{
for
(
const
id
of
ids
)
{
const
data
=
apiData
[
id
];
const
data
=
apiData
[
id
];
const
node
=
LiteGraph
.
createNode
(
data
.
class_type
);
const
node
=
LiteGraph
.
createNode
(
data
.
class_type
);
node
.
id
=
id
;
node
.
id
=
isNaN
(
+
id
)
?
id
:
+
id
;
graph
.
add
(
node
);
graph
.
add
(
node
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment