Skip to content

Commit

Permalink
return schedule only when is true
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa committed Jun 5, 2024
1 parent ce8911a commit 98b2221
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/web/components/saveFeatureWithValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export const saveFeatureWithValidation = (cb: (schedule?: boolean) => void) => {
yesText: 'Save',
})
} else {
cb(schedule)
if (schedule) {
cb(schedule)
} else {
cb()
}
}
}
}

0 comments on commit 98b2221

Please sign in to comment.