Skip to content

Commit

Permalink
Move ADDONS_UNLOADING event hook to after login handler
Browse files Browse the repository at this point in the history
This way, the data will only save if the user has fully logged in and datasets are appropriately defined.
  • Loading branch information
QartemisT authored May 17, 2024
1 parent d1aa113 commit dbeb4e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WagoAnalytics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ do
frame:RegisterEvent("ADDON_ACTION_BLOCKED")
frame:RegisterEvent("ADDON_ACTION_FORBIDDEN")
frame:RegisterEvent("LUA_WARNING")
frame:RegisterEvent("ADDONS_UNLOADING")
if isRetail then
frame:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED")
end
Expand Down Expand Up @@ -127,6 +126,7 @@ do
handleError(error.message, error.stack and true or nil, error)
end)
end
frame:RegisterEvent("ADDONS_UNLOADING")
-- Handles when the player changes their specialization
elseif event == "PLAYER_SPECIALIZATION_CHANGED" then
local currentSpec = GetSpecialization()
Expand Down

0 comments on commit dbeb4e0

Please sign in to comment.