Skip to content

Commit

Permalink
Widget Manager Lua error
Browse files Browse the repository at this point in the history
  • Loading branch information
tukz committed Oct 9, 2024
1 parent f9fbfd0 commit c8bcdce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 0 additions & 4 deletions Tukui/Core/Temp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,3 @@ end

Temp:RegisterEvent("PLAYER_LOGIN")
Temp:SetScript("OnEvent", Temp.Enable)


--hooksecurefunc("SetCVar", function(a, b, c) print(a,b,c) end)

12 changes: 9 additions & 3 deletions Tukui/Modules/UnitFrames/WidgetManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,18 @@ end

-- Add a new or replace an existing widget create function.
function WidgetManager:addOrReplace(name, widget)
if self.widgets[name] then
if self.widgets and self.widgets[name] then
self.widgets[name] = widget
else
self.addToIndex(self, widget)
self.widgets[name] = widget
if self.addToIndex then
self.addToIndex(self, widget)
end

if self.widgets then
self.widgets[name] = widget
end
end

return true
end

Expand Down

1 comment on commit c8bcdce

@JerichoR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will catch the error but likely not work. Please see my PR #206
The 2 internal functions were in a different table and therefore not found.

Please sign in to comment.