I have a situation (and tried every solution I can find on the internet )
The code:
if (Meteor.isServer) {
Meteor.methods({
validateAddress: function() {
var fut = new Future();
setTimeout(function(){
fut['return']("some text");
}, 1000);
return fut.wait();
})
}
and on the client side I call:
Meteor.call("validateAddress", function(res){
console.log(res);
})
And it gives me undefined. My guess is that I can’t receive a future promise on the client?
EDIT: my callback function should have been function(err, res) {…} it’s working now, thanks!