@@ -13,6 +13,7 @@ local strmatch = strmatch
1313local strsub = strsub
1414local tinsert = tinsert
1515local tonumber = tonumber
16+ local type = type
1617local unpack = unpack
1718local xpcall = xpcall
1819
@@ -258,15 +259,15 @@ end
258259
259260do -- Midnight API Fix
260261 local BackdropTemplateMixin_SetupTextureCoordinates = _G .BackdropTemplateMixin .SetupTextureCoordinates
261- function BackdropTemplateMixin :SetupTextureCoordinates (...)
262+ function _G . BackdropTemplateMixin :SetupTextureCoordinates (...)
262263 local enabled = E and E .global and E .global .WT and E .global .WT .core and E .global .WT .core .midnightAPIFix
263264 if not enabled or E :NotSecretValue (self :GetWidth ()) then
264265 BackdropTemplateMixin_SetupTextureCoordinates (self , ... )
265266 end
266267 end
267268
268269 -- Fix from NDui
269- MoneyFrame_Update_OLD = MoneyFrame_Update
270+ local MoneyFrame_Update_OLD = _G . MoneyFrame_Update
270271
271272 local function GetMoneyFrame (frameOrName )
272273 local argType = type (frameOrName )
@@ -278,7 +279,7 @@ do -- Midnight API Fix
278279 return nil
279280 end
280281
281- function MoneyFrame_Update (frameName , money , forceShow )
282+ function _G . MoneyFrame_Update (frameName , money , forceShow )
282283 local enabled = E and E .global and E .global .WT and E .global .WT .core and E .global .WT .core .midnightAPIFix
283284 if not enabled then
284285 MoneyFrame_Update_OLD (frameName , money , forceShow )
@@ -293,9 +294,9 @@ do -- Midnight API Fix
293294 end
294295
295296 -- Fix from NDui
296- SetTooltipMoney_OLD = SetTooltipMoney
297+ local SetTooltipMoney_OLD = _G . SetTooltipMoney
297298
298- function SetTooltipMoney (frame , money , type , prefixText , suffixText )
299+ function _G . SetTooltipMoney (frame , money , type , prefixText , suffixText )
299300 local enabled = E and E .global and E .global .WT and E .global .WT .core and E .global .WT .core .midnightAPIFix
300301 if not enabled then
301302 SetTooltipMoney_OLD (frame , money , type , prefixText , suffixText )
0 commit comments