0👍
everything look fine, but i guess the problem maybe involve with this.$toast
.
so try to remove it and check if it reach last line in then
or catch
-1👍
As mentioned in the comments, this
is not this
inside nested functions. Assign var me = this
at the top level of your closure, then use it throughout the rest of the function.
While we’re here, you’re doing some application scope heavy lifting (creating a new user) in a Vue component and, surely as a consequence, your code makes heavy use of $emit. Another way is possible. You can get these sequences out of Vue, into global scope where they can directly modify a store, then use Vue’s reactivity system, not the anemic events system, to propagate the changes.
Source:stackexchange.com