UNPKG

sportsbet-mobile

Version:
36 lines (27 loc) 748 B
///<reference path=".#ts/client.d.ts" /> interface Templates { live_11: Template; } Template.live_11.helpers({ selections: function() { var market: Betting.Market = <Betting.Market>this; var selections = market.orderedByOddsSelections(); var event = market.event.fetch(); if (!event) { return; } var participants = event.participants(); selections.forEach(function(selection) { if (!selection.backOdds && selection.name == '-1') { return; } if (+selection.name == 1) { selection.name = 'Set ' + selection.specialBetValue + ': ' + participants[0]; } if (+selection.name == 2) { selection.name = 'Set ' + selection.specialBetValue + ': ' + participants[1]; } }); return selections; } });