In my mutations.js file, I have encountered a situation where one function is calling another function within the same file. Here's an example of my code:
export default {
async addQuestionAnswer(state, payload) {
alert(payload);
this.updateSubjects(state);
alert("This is never reached");
},
updateSubjects(state) {
alert("This is never reached");
},
}
I am seeking assistance on how to properly call the updateSubjects function from the addQuestionAnswer function. Upon checking my console log, I came across this error message:
Uncaught (in promise) TypeError: _this.updateSubjects is not a function