Skip to content

Commit 8aaaefc

Browse files
committed
ack comments
1 parent 242710f commit 8aaaefc

File tree

1 file changed

+6
-3
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components

1 file changed

+6
-3
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/version-description-modal.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ export function VersionDescriptionModal({
4343
const isGenerating = generateMutation.isPending
4444

4545
const handleCloseAttempt = useCallback(() => {
46-
if (hasChanges && !updateMutation.isPending) {
46+
if (updateMutation.isPending || isGenerating) {
47+
return
48+
}
49+
if (hasChanges) {
4750
setShowUnsavedChangesAlert(true)
4851
} else {
4952
onOpenChange(false)
5053
}
51-
}, [hasChanges, updateMutation.isPending, onOpenChange])
54+
}, [hasChanges, updateMutation.isPending, isGenerating, onOpenChange])
5255

5356
const handleDiscardChanges = useCallback(() => {
5457
setShowUnsavedChangesAlert(false)
@@ -66,7 +69,7 @@ export function VersionDescriptionModal({
6669
})
6770
}, [workflowId, version, generateMutation])
6871

69-
const handleSave = useCallback(async () => {
72+
const handleSave = useCallback(() => {
7073
if (!workflowId) return
7174

7275
updateMutation.mutate(

0 commit comments

Comments
 (0)