Skip to content

Commit

Permalink
fix(barwidgets): only SafeWrapFunc Initialize() once
Browse files Browse the repository at this point in the history
Previously, Initialize() was wrapped dozens of times for each widget.
  • Loading branch information
salinecitrine authored and sprunk committed Feb 24, 2024
1 parent fb0d07a commit 9894640
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions luaui/barwidgets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -836,9 +836,10 @@ local function SafeWrapWidget(widget)
if widget[ciName] then
widget[ciName] = SafeWrapFunc(widget[ciName], ciName)
end
if widget.Initialize then
widget.Initialize = SafeWrapFunc(widget.Initialize, 'Initialize')
end
end

if widget.Initialize then
widget.Initialize = SafeWrapFunc(widget.Initialize, 'Initialize')
end
end

Expand Down

0 comments on commit 9894640

Please sign in to comment.