diff --git a/apps/console/src/app/(providers)/root-provider.tsx b/apps/console/src/app/(providers)/root-provider.tsx index 50cd38cb51..c524c454e9 100644 --- a/apps/console/src/app/(providers)/root-provider.tsx +++ b/apps/console/src/app/(providers)/root-provider.tsx @@ -80,7 +80,7 @@ export const RootProvider = ({ closeModal(); dismissToast(); setPreviousPathname(pathname); - }, [pathname, previousPathname]); + }, [pathname]); return ( diff --git a/packages/toolkit/src/view/pipeline-builder/lib/getReferencesFromAny.ts b/packages/toolkit/src/view/pipeline-builder/lib/getReferencesFromAny.ts index a9403a18c9..ebe5e17326 100644 --- a/packages/toolkit/src/view/pipeline-builder/lib/getReferencesFromAny.ts +++ b/packages/toolkit/src/view/pipeline-builder/lib/getReferencesFromAny.ts @@ -11,10 +11,12 @@ export function getReferencesFromAny(value: any) { references: InstillReference[] = [], ): InstillReference[] { if (Array.isArray(value)) { + const refs = [...references]; for (const item of value) { - const refs = getReferences(item, references); - return [...references, ...refs]; + const itemRefs = getReferences(item, references); + refs.push(...itemRefs); } + return refs; } else if (typeof value === "string") { const refs = getReferencesFromString(value);