diff --git a/src/frontend/src/CustomNodes/GenericNode/index.tsx b/src/frontend/src/CustomNodes/GenericNode/index.tsx
index 2bdcece1b..4f065e8a4 100644
--- a/src/frontend/src/CustomNodes/GenericNode/index.tsx
+++ b/src/frontend/src/CustomNodes/GenericNode/index.tsx
@@ -349,7 +349,7 @@ export default function GenericNode({
)}
{showNode && (
-
buildFlow(data.id)}
>
diff --git a/src/frontend/src/stores/flowStore.ts b/src/frontend/src/stores/flowStore.ts
index e2691f742..01b4acaea 100644
--- a/src/frontend/src/stores/flowStore.ts
+++ b/src/frontend/src/stores/flowStore.ts
@@ -330,9 +330,9 @@ const useFlowStore = create((set, get) => ({
});
},
buildFlow: async (nodeId?: string) => {
- const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
- const setSuccessData = useAlertStore((state) => state.setSuccessData);
- const setErrorData = useAlertStore((state) => state.setErrorData);
+ const currentFlow = useFlowsManagerStore.getState().currentFlow;
+ const setSuccessData = useAlertStore.getState().setSuccessData;
+ const setErrorData = useAlertStore.getState().setErrorData;
function handleBuildUpdate(data: any) {
get().addDataToFlowPool(data.data[data.id], data.id);
}