Skip to content

Commit

Permalink
finally fix ppt issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rathoz committed Sep 24, 2024
1 parent 1a04261 commit 5ca152d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/prize_pool/commons/prize_pool.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ local Placement = Lua.import('Module:PrizePool/Placement')
local OpponentLibrary = require('Module:OpponentLibraries')
local Opponent = OpponentLibrary.Opponent

local Widgets = require('Module:Widget/All')
local Widgets = Lua.import('Module:Widget/All')
local TableRow = Widgets.TableRow
local TableCell = Widgets.TableCell

Expand Down
2 changes: 1 addition & 1 deletion components/prize_pool/commons/prize_pool_base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local OpponentLibraries = require('Module:OpponentLibraries')
local Opponent = OpponentLibraries.Opponent
local OpponentDisplay = OpponentLibraries.OpponentDisplay

local Widgets = require('Module:Widget/All')
local Widgets = Lua.import('Module:Widget/All')
local WidgetTable = Widgets.TableOld
local TableRow = Widgets.TableRow
local TableCell = Widgets.TableCell
Expand Down
9 changes: 5 additions & 4 deletions components/widget/widget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local FnUtil = require('Module:FnUtil')
local ErrorDisplay = require('Module:Error/Display')
local Logic = require('Module:Logic')
local String = require('Module:StringUtils')

local Table = require('Module:Table')

---@class Widget: BaseClass
---@operator call(table): self
Expand All @@ -20,10 +20,11 @@ local String = require('Module:StringUtils')
---@field props table<string, any>
---@field makeChildren? fun(self:Widget, injector: WidgetInjector?): Widget[]?
local Widget = Class.new(function(self, props)
self.props = props or {}
self.props = Table.copy(props) or {}
self.props.children = self.props.children or {}
self.children = self.children or self.props.children -- Legacy support @deprecated
self.context = {} -- Set by the parent
self.context = {} -- Populated by the parent
---@deprecated Legacy support
self.children = self.children or self.props.children
end)

---Asserts the existence of a value and copies it
Expand Down

0 comments on commit 5ca152d

Please sign in to comment.