-
Hi! I recently changed the function "addHistory". It has now a new argument: So, I tried to edit socket.js :
But this doesn't work, and after some tests, I am sure of it: the program recognizes the value "players" but not the value "nbVotes". So, IMO, there is only one explanation: after this commit, some function in some file is called, this function still takes account the one-variable version of addHistory, and I must edit it. So, what happens next when the program creates the commit? And how to edit that? Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey, VueX mutators (which are called with |
Beta Was this translation helpful? Give feedback.
Hey, VueX mutators (which are called with
commit
) can only take one argument, so if you want to pass more than justplayers
toaddHistory
, you have to pass it as an object or array, like you did in your socket.js.addHistory(state, { players, nbVotes })
for example, which would require the parameter to always be an object.