Skip to content

Commit 4d8bfb0

Browse files
ivicacclaude
andcommitted
4754 client - Guard saveProperty calls on missing update mutations
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 30648aa commit 4d8bfb0

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

  • client/src/pages/platform/workflow-editor/components/properties/hooks

client/src/pages/platform/workflow-editor/components/properties/hooks/useProperty.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,12 @@ export const useProperty = ({
629629
setControlledDynamicMode(toDynamic);
630630
setControlledFromAi(undefined);
631631

632-
if (wasFromAi && path && workflow.id) {
632+
if (
633+
wasFromAi &&
634+
path &&
635+
workflow.id &&
636+
(updateWorkflowNodeParameterMutation || updateClusterElementParameterMutation)
637+
) {
633638
saveProperty({
634639
fromAi: false,
635640
includeInMetadata: custom,
@@ -661,7 +666,11 @@ export const useProperty = ({
661666

662667
fieldOnChange(value);
663668

664-
if (!path || !workflow.id) {
669+
if (
670+
!path ||
671+
!workflow.id ||
672+
!(updateWorkflowNodeParameterMutation || updateClusterElementParameterMutation)
673+
) {
665674
return;
666675
}
667676

0 commit comments

Comments
 (0)