Check if mutation exists before calling commit

This commit is contained in:
PrestonN 2022-04-10 17:15:41 -04:00
parent ed6861a09b
commit 21a4739c68
1 changed files with 3 additions and 1 deletions

View File

@ -325,7 +325,9 @@ const customActions = {
dispatch(defaultSideEffectsTriggerId(_id), value) dispatch(defaultSideEffectsTriggerId(_id), value)
} }
commit(defaultMutationId(_id), value) if (Object.keys(mutations).includes(defaultMutationId(_id))) {
commit(defaultMutationId(_id), value)
}
} }
} catch (errMessage) { } catch (errMessage) {
console.error(errMessage) console.error(errMessage)