Skip to content

Commit

Permalink
Fix updateGame function to use instance binding (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolstyi authored and andrewda committed Jul 25, 2017
1 parent a57591d commit 24a073f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Livescore.prototype._onScoreboard = function(event) {
this.emit('started');
}

updateGame(event);
this._updateGame(event);

this.getTeams((teams) => {
var scoreboard = new Livescore.Classes.Scoreboard(event);
Expand Down Expand Up @@ -280,7 +280,7 @@ Livescore.prototype._onMapChange = function(event) {
this.emit('mapChange', event);
};

function updateGame(scoreboard) {
Livescore.prototype._updateGame = function(scoreboard) {
var tPlayers = [];
var ctPlayers = [];

Expand Down Expand Up @@ -321,6 +321,6 @@ function updateGame(scoreboard) {
});

this.scoreboard = scoreboard;
}
};

module.exports = Livescore;

0 comments on commit 24a073f

Please sign in to comment.