Skip to content

Commit

Permalink
Fix contextualDateOrNow call in warcraft PlayerExt (#3390)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha authored Oct 16, 2023
1 parent 7c1ef5f commit aa5a81d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/opponent/wikis/warcraft/player_ext_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
--

local Array = require('Module:Array')
local DateExt = require('Module:Date/Ext')
local Flags = require('Module:Flags')
local Faction = require('Module:Faction')
local FnUtil = require('Module:FnUtil')
Expand Down Expand Up @@ -44,7 +45,7 @@ end)
function CustomPlayerExt.fetchPlayerRace(resolvedPageName, date)
local lpdbPlayer = CustomPlayerExt.fetchPlayer(resolvedPageName)
if lpdbPlayer and lpdbPlayer.raceHistory then
date = date or PlayerExt.getContextualDateOrNow()
date = date or DateExt.getContextualDateOrNow()
local entry = Array.find(lpdbPlayer.raceHistory, function(entry) return date <= entry.endDate end)
return entry and Faction.read(entry.race)
else
Expand Down

0 comments on commit aa5a81d

Please sign in to comment.