Skip to content

Commit

Permalink
fix: dont close modal on error (strapi#19946)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhurisandbhor authored Apr 2, 2024
1 parent 48f5eea commit a0da7e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
Combobox,
ComboboxOption,
} from '@strapi/design-system';
import { formatISO, parse } from 'date-fns';
import { formatISO } from 'date-fns';
import { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';
import { Formik, Form, useFormikContext } from 'formik';
import { useIntl } from 'react-intl';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ const ReleaseDetailsPage = () => {
defaultMessage: 'Release updated.',
}),
});
toggleEditReleaseModal();
} else if (isAxiosError(response.error)) {
// When the response returns an object with 'error', handle axios error
toggleNotification({
Expand All @@ -910,8 +911,6 @@ const ReleaseDetailsPage = () => {
message: formatMessage({ id: 'notification.error', defaultMessage: 'An error occurred' }),
});
}

toggleEditReleaseModal();
};

const handleDeleteRelease = async () => {
Expand Down

0 comments on commit a0da7e7

Please sign in to comment.