Meteor.call returns undefined when returned from _.wrapAsync function

When the template view is loaded, the client does a Meteor.call('getPlayerScore') to the server to grab some data.

On the server, the method getPlayerScore executes a synchronous function client.zrevrangeSync using _.wrapAsync and returns 1234 string after the wrapped function finishes running.

Problem: Why does the client receive result as undefined? result is not undefined if it is returned before client.zrevrangeSync is called, but is undefined if returned from within client.zrevrangeSync.

Meteor.methods({

    getPlayerScore: function(playerId) {

        var client = redis.createClient(6379, redisServer)

        client.zrevrangeSync = Meteor._wrapAsync(client.zrevrange)
        client.zrevrangeSync(['players:' + playerId, 0, 3, 'WITHSCORES'], function(err, result) {
            return '1234'
        })
    }

})





Template.playerScoreboard.helpers({
    playerScore: function () {

        Meteor.call('getPlayerScore', 1, function (error, result) { 
            console.log('result: ', result)
            return
        });

    }
})

Typically you don't give a callback in & return what you get/unless its coffee script.

client.zrevrangeSync = Meteor._wrapAsync(client.zrevrange.bind(client));

return client.zrevrangeSync(['players:' + playerId, 0, 3, 'WITHSCORES']);