Skip to content

Commit

Permalink
fix(infobox): do not error when player has team1 but not team2 (#4522)
Browse files Browse the repository at this point in the history
* fix(infobox) On OW: Do not error when a player has no team

* Update components/infobox/wikis/overwatch/infobox_person_player_custom.lua

Co-authored-by: Rikard Blixt <[email protected]>

---------

Co-authored-by: Rikard Blixt <[email protected]>
  • Loading branch information
mbergen and Rathoz authored Aug 14, 2024
1 parent b1059b6 commit 8c077c4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ end
function CustomPlayer:createBottomContent()
if self:shouldStoreData(self.args) and String.isNotEmpty(self.args.team) then
local teamPage = Team.page(mw.getCurrentFrame(), self.args.team)
local team2Page = Team.page(mw.getCurrentFrame(), self.args.team2)
local team2Page = String.isNotEmpty(self.args.team2) and Team.page(mw.getCurrentFrame(), self.args.team2) or nil
return
tostring(MatchTicker.player{recentLimit = 3}) ..
Template.safeExpand(
Expand Down

0 comments on commit 8c077c4

Please sign in to comment.