Answer the question
In order to leave comments, you need to log in
Nuxt Uncaught (in promise) TypeError: commit is not a function?
Action example
async [FORM_ACTION_SUBMIT_FORM] ({commit, state}, {fetchBody}) {
if (true === state.isSending) {
return new Promise(async (resolve, reject) => {
reject(new Error('Already sending...'));
});
}
_callee3$ @ actions.js?4805:39
tryCatch @ runtime.js?96cf:45
invoke @ runtime.js?96cf:271
prototype.<computed> @ runtime.js?96cf:97
asyncGeneratorStep @ asyncToGenerator.js?1da1:3
_next @ asyncToGenerator.js?1da1:25
eval @ asyncToGenerator.js?1da1:32
eval @ asyncToGenerator.js?1da1:21
eval @ actions.js?4805:39
wrappedGetter @ vuex.esm.js?2f62:777
eval @ vuex.esm.js?2f62:95
get @ vue.runtime.esm.js?2b0e:4479
evaluate @ vue.runtime.esm.js?2b0e:4584
computedGetter @ vue.runtime.esm.js?2b0e:4836
get @ vuex.esm.js?2f62:567
get @ backend.js:1444
stringify @ backend.js:3147
stringify @ backend.js:270
stringifyStore @ backend.js:1191
reset @ backend.js:1058
VuexBackend @ backend.js:893
initVuexBackend @ backend.js:1430
(anonymous) @ backend.js:2208
Promise.then (async)
connect @ backend.js:2131
initBackend @ backend.js:2119
handshake @ backend.js:4322
postMessage (async)
o @ proxy.js:1
262 @ proxy.js:1
n @ proxy.js:1
(anonymous) @ proxy.js:1
(anonymous) @ proxy.js:1
actions.js?4805:47 Uncaught (in promise) TypeError: commit is not a function
at _callee2$ (actions.js?4805:47)
at tryCatch (runtime.js?96cf:45)
at Generator.invoke [as _invoke] (runtime.js?96cf:271)
at Generator.prototype.<computed> [as next] (runtime.js?96cf:97)
at asyncGeneratorStep (asyncToGenerator.js?1da1:3)
at _next (asyncToGenerator.js?1da1:25)
at eval (asyncToGenerator.js?1da1:32)
at new Promise (<anonymous>)
at eval (asyncToGenerator.js?1da1:21)
at eval (actions.js?4805:39)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question