Skip to content

Commit

Permalink
fix(match2): missing nil catch in submatch check (#5285)
Browse files Browse the repository at this point in the history
fix(match2): catch nil in submatch check
  • Loading branch information
hjpalpha authored Jan 7, 2025
1 parent e3d99e0 commit 1afe043
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ end
function StarcraftMatchGroupUtil.constructSubmatch(games, match)
local firstGame = games[1]
local opponents = Table.deepCopy(firstGame.opponents)
local isSubmatch = String.startsWith(firstGame.map, 'Submatch')
local isSubmatch = String.startsWith(firstGame.map or '', 'Submatch')
if isSubmatch then
games = {firstGame}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ end
function CustomMatchGroupUtil.constructSubmatch(games, match)
local firstGame = games[1]
local opponents = Table.deepCopy(firstGame.opponents)
local isSubmatch = String.startsWith(firstGame.map, 'Submatch')
local isSubmatch = String.startsWith(firstGame.map or '', 'Submatch')
if isSubmatch then
games = {firstGame}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ end
function CustomMatchGroupUtil.constructSubmatch(games, match)
local firstGame = games[1]
local opponents = Table.deepCopy(firstGame.opponents)
local isSubmatch = String.startsWith(firstGame.map, 'Submatch')
local isSubmatch = String.startsWith(firstGame.map or '', 'Submatch')
if isSubmatch then
games = {firstGame}
end
Expand Down

0 comments on commit 1afe043

Please sign in to comment.