Bug: FadePersist misses early Blizzard_PlayerSpells loads
gekkenjuu opened this issue · 2 comments
In retail, the toxiui v6.7.9 FadePersist module waits for Blizzard_PlayerSpells to load to apply its OnShow/OnHide hooks to PlayerSpellsFrame
. Third-party addons may cause Blizzard_PlayerSpells to load earlier than FP:Enable()
runs, which makes this scheme unreliable — if Blizzard_PlayerSpells is loaded early, FadePersist will never observe ADDON_LOADED for Blizzard_PlayerSpells, never apply the hooks, and hence fail to toggle fade overrides when the spellbook opens.
Consider using a helper method such as EventUtil.ContinueOnAddOnLoaded (which would handle the already-loaded case for you), or checking whether _G.PlayerSpellsFrame
already exists by the time FP:Enable()
runs.
Thank you, I didn't consider that other AddOns might force load the AddOn before the spellbook is opened.
Should be good now with c0d4ba9