+
)}
diff --git a/web/app/components/rag-pipeline/hooks/use-nodes-sync-draft.ts b/web/app/components/rag-pipeline/hooks/use-nodes-sync-draft.ts
index 0a12cf6557..b373bca4f5 100644
--- a/web/app/components/rag-pipeline/hooks/use-nodes-sync-draft.ts
+++ b/web/app/components/rag-pipeline/hooks/use-nodes-sync-draft.ts
@@ -32,7 +32,7 @@ export const useNodesSyncDraft = () => {
ragPipelineVariables,
} = workflowStore.getState()
- if (pipelineId) {
+ if (pipelineId && !!nodes.length) {
const producedNodes = produce(nodes, (draft) => {
draft.forEach((node) => {
Object.keys(node.data).forEach((key) => {