Merge pull request #140 from bananasss00/main

Fix suggestion removal for each slot type in LiteGraph
This commit is contained in:
Jukka Seppänen 2024-11-12 16:39:22 +02:00 committed by GitHub
commit 1dbb38d63d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);