fix duplicate node param issue

This commit is contained in:
Sam Lavigne 2023-08-27 11:47:41 -04:00
parent 5714ace735
commit d93be90372
2 changed files with 4 additions and 2 deletions

View File

@ -13,7 +13,7 @@
function selectFilters(sel) {
if (sel == "video") {
// return FILTERS.filter((f) => f.type.startsWith("V") || f.type.endsWith("V"));
return FILTERS.filter((f) => f.type[0] === "V" || (f.type[0] === "|") || f.type === "N->V");
return FILTERS.filter((f) => f.type[0] === "V" || f.type === "N->V");
} else if (sel == "audio") {
// return FILTERS.filter((f) => f.type.startsWith("A") || f.type.endsWith("A"));
return FILTERS.filter((f) => f.type[0] === "A" || f.type === "N->A");

View File

@ -178,7 +178,9 @@ nodes.subscribe(($nodes) => {
edges.set(newEdges);
});
export function addNode(data, type) {
export function addNode(_data, type) {
const data = JSON.parse(JSON.stringify(_data));
let ins = [];
let outs = [];