mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2025-12-09 04:44:30 +08:00
Merge pull request #140 from bananasss00/main
Fix suggestion removal for each slot type in LiteGraph
This commit is contained in:
commit
1dbb38d63d
@ -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