Skip to content

Commit

Permalink
fix: Flag update scheduling (#4115)
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa authored Jun 5, 2024
1 parent 6dbcb4a commit e90d248
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontend/web/components/saveFeatureWithValidation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const saveFeatureWithValidation = (cb: () => void) => {
return () => {
export const saveFeatureWithValidation = (cb: (schedule?: boolean) => void) => {
return (schedule: boolean) => {
if (document.getElementById('language-validation-error')) {
openConfirm({
body: 'Your remote config value does not pass validation for the language you have selected. Are you sure you wish to save?',
Expand All @@ -9,7 +9,11 @@ export const saveFeatureWithValidation = (cb: () => void) => {
yesText: 'Save',
})
} else {
cb()
if (schedule) {
cb(schedule)
} else {
cb()
}
}
}
}

0 comments on commit e90d248

Please sign in to comment.