Skip to content

Commit

Permalink
Timerstamps: Handle hook error on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvanaar committed Jun 8, 2020
1 parent 21c5e61 commit 837e186
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/Timestamps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,12 @@ Prat:AddModuleToLoad(function()
end
end)

local hookedFrames = {}

function module:OnModuleEnable()
for _, v in pairs(Prat.HookedFrames) do
self:SecureHook(v, "AddMessage")
hookedFrames[v:GetName()] = true
end

self.secondsDifference = 0
Expand All @@ -276,7 +279,7 @@ Prat:AddModuleToLoad(function()
return PL["Chat window timestamp options."]
end

local hookedFrames = {}


function module:Prat_FramesUpdated(info, name, chatFrame, ...)
if not hookedFrames[chatFrame:GetName()] then
Expand Down

0 comments on commit 837e186

Please sign in to comment.