1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Fix alert disabling type error (#8561)

When disabling an alert, the background `alertEnabledness` state of the
alert was being set to `undefined` instead of `false`. This didn't have
any user-facing effect, since `undefined` is falsey, but it did result
in a PropType error on the Alert settings page. This mistake was made
in #8550.

The `alertEnabledness` state is now correctly set to `false` instead of
`undefined`.
This commit is contained in:
Mark Stacey 2020-05-08 21:49:41 -03:00 committed by GitHub
parent ee4f05c930
commit d8a4b7fc9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ export const dismissAndDisableAlert = () => {
return async (dispatch) => {
try {
await dispatch(disableAlertRequested())
await dispatch(setAlertEnabledness(name), false)
await dispatch(setAlertEnabledness(name, false))
await dispatch(disableAlertSucceeded())
} catch (error) {
console.error(error)