I get an error with this code snippet on Meteor.js:
Client side:
Meteor.call("logUser", function(myvar){
console.log("le chat client : "+myvar) ;
Session.set("chatId", myvar);
});
Server side:
Meteor.methods({
logUser : function(mycallback){
mycallback("myString");
}
});
I really donβt understand why it does not work, the method works well, but the code is interrupted when "mycallback" is called:
"Undefined is not a function"
source
share