Check if mutation exists before calling commit
This commit is contained in:
parent
ed6861a09b
commit
21a4739c68
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue