From 303f774989df4e6979a1ada5c124f732390bfdf8 Mon Sep 17 00:00:00 2001 From: Felix Hamme Date: Tue, 16 Apr 2019 14:17:03 +0200 Subject: [PATCH] Use strong typed comparison expressions --- pages/tournament.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/tournament.js b/pages/tournament.js index da0c919..52581f8 100644 --- a/pages/tournament.js +++ b/pages/tournament.js @@ -56,7 +56,7 @@ class PrivateTournamentPage extends React.Component {
{playoffStages.map(stage => - )} + )}
); @@ -368,12 +368,12 @@ function convertMatch(apiMatch) { state: apiMatch.state }; - if(apiMatch.match_scores.length == 2) { + if(apiMatch.match_scores.length === 2) { result.team1 = apiMatch.match_scores[0].team.name; result.scoreTeam1 = apiMatch.match_scores[0].points; result.team2 = apiMatch.match_scores[1].team.name; result.scoreTeam2 = apiMatch.match_scores[1].points; - } else if(apiMatch.match_scores.length == 1) { + } else if(apiMatch.match_scores.length === 1) { result.team1 = apiMatch.match_scores[0].team.name; result.scoreTeam1 = apiMatch.match_scores[0].points; result.team2 = 'TBD'; @@ -424,7 +424,7 @@ class Main extends React.Component { const { status, tournament } = this.state; - if (status == 200) { + if (status === 200) { return (