Do not propagate state change unless workflow name changed

This commit is contained in:
Emir Karabeg
2025-01-31 14:58:48 -08:00
parent 88f25bb0dd
commit 71a4d53d83

View File

@@ -91,8 +91,11 @@ export function ControlBar() {
}
const handleNameSubmit = () => {
if (activeWorkflowId && editedName.trim()) {
updateWorkflow(activeWorkflowId, { name: editedName.trim() })
if (activeWorkflowId) {
const trimmedName = editedName.trim()
if (trimmedName && trimmedName !== workflows[activeWorkflowId].name) {
updateWorkflow(activeWorkflowId, { name: trimmedName })
}
setIsEditing(false)
}
}