Skip to content

Commit

Permalink
Prevent C_TradeSkillUI.CraftRecipe error in Cataclysm Classic
Browse files Browse the repository at this point in the history
Check for `C_TradeSkillUI.CraftRecipe` before trying to hook it, since Cataclysm Classic has `C_TradeSkillUI` but does not have `C_TradeSkillUI.CraftRecipe`.
  • Loading branch information
AlexFolland authored and Nevcairiel committed Jun 19, 2024
1 parent fc504f8 commit 35c99ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/Tradeskill.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function Tradeskill:OnEnable()
else
self:RegisterEvent("ADDON_LOADED")
end
elseif C_TradeSkillUI then
elseif C_TradeSkillUI and C_TradeSkillUI.CraftRecipe then
self:SecureHook(C_TradeSkillUI, "CraftRecipe", "DoTradeSkillClassic")
else
self:SecureHook("DoTradeSkill", "DoTradeSkillClassic")
Expand Down

0 comments on commit 35c99ae

Please sign in to comment.