Skip to content

Commit

Permalink
Handle series game number being Nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
NHLGames committed Jul 16, 2020
1 parent fe441df commit f577dbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NHLGames/Controls/GameControl.vb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Namespace Controls

If _game.GameType.Equals(GameTypeEnum.Preseason) Then
lblNotInSeason.Text = NHLGamesMetro.RmText.GetString("lblPreseason").ToUpper()
ElseIf _game.GameType.Equals(GameTypeEnum.Series) Then
ElseIf _game.GameType.Equals(GameTypeEnum.Series) AndAlso _game.SeriesGameNumber <> 0 Then
Dim seriesStatusShort =
String.Format(NHLGamesMetro.RmText.GetString("lblGame"), _game.SeriesGameNumber.ToString()).
ToUpper() 'Game 1
Expand Down
2 changes: 1 addition & 1 deletion NHLGames/Objects/GameManager.vb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Namespace Objects
.GameStateDetailed = game.status.detailedState
}

If currentGame.GameType = GameTypeEnum.Series Then
If currentGame.GameType = GameTypeEnum.Series AndAlso game.seriesSummary?.gameNumber IsNot Nothing Then
currentGame.SeriesGameNumber = game.seriesSummary?.gameNumber
currentGame.SeriesGameStatus = If(game.seriesSummary?.seriesStatusShort, String.Empty)
End If
Expand Down

0 comments on commit f577dbf

Please sign in to comment.