Skip to content

Commit

Permalink
Clear errors on canceling
Browse files Browse the repository at this point in the history
  • Loading branch information
dottorblaster committed Mar 25, 2024
1 parent cd7be02 commit b1abc6e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion assets/js/pages/SettingsPage/SettingsPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
updateSoftwareUpdatesSettings,
setEditingSoftwareUpdatesSettings,
clearSoftwareUpdatesSettings,
setSoftwareUpdatesSettingsErrors,
} from '@state/softwareUpdatesSettings';
import {
getSoftwareUpdatesSettings,
Expand Down Expand Up @@ -286,7 +287,10 @@ function SettingsPage() {
dispatch(saveSoftwareUpdatesSettings(payload));
}
}}
onCancel={() => dispatch(setEditingSoftwareUpdatesSettings(false))}
onCancel={() => {
dispatch(setSoftwareUpdatesSettingsErrors([]));
dispatch(setEditingSoftwareUpdatesSettings(false));
}}
/>
</div>
)}
Expand Down

0 comments on commit b1abc6e

Please sign in to comment.