 window.FootballPickService = class FootballPickService
     constructor: (@$http, @$timeout, @$q) ->
         @picks              = {}
-        @queuedPickChanges  = {}
+        @queuedPickChanges  = []
         @queueTimeout       = null
 
 



    changePick: (game, player, team) ->
        @queuedPickChanges[game.game_id] = team.team_id
        @$timeout.cancel(@queueTimeout) if @queueTimeout
        @queueTimeout = @$timeout(
            () =>
                picksArray = for game_id, team_id of @queuedPickChanges
                    game_id: game_id
                    team_id: team_id
                data = {fantasy_picks: {}}
                this.preparePick(data, picksArray) while (picksArray.length > 0)
                @$http.post("/api/v1.0/football/fantasy-picks/", data)
                    .success((response) =>
                        console.log(response)

            true
        )




