mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-01-23 07:34:29 +08:00
Fix suggestion removal for each slot type in LiteGraph
This commit is contained in:
parent
5f032e3b8f
commit
2cabc3eaa3
@ -56,7 +56,7 @@ app.registerExtension({
|
||||
for (const arr of Object.values(LiteGraph.slot_types_default_in)) {
|
||||
for (const valueToAdd of valuesToAddToIn) {
|
||||
const idx = arr.indexOf(valueToAdd);
|
||||
if (idx !== 0) {
|
||||
if (idx !== -1) {
|
||||
arr.splice(idx, 1);
|
||||
}
|
||||
arr.unshift(valueToAdd);
|
||||
@ -66,7 +66,7 @@ app.registerExtension({
|
||||
for (const arr of Object.values(LiteGraph.slot_types_default_out)) {
|
||||
for (const valueToAdd of valuesToAddToOut) {
|
||||
const idx = arr.indexOf(valueToAdd);
|
||||
if (idx !== 0) {
|
||||
if (idx !== -1) {
|
||||
arr.splice(idx, 1);
|
||||
}
|
||||
arr.unshift(valueToAdd);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user