fix: view.width functions may return strings (#3020)
* Fix get_size() function when size is a function return string * update view.width help --------- Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -119,7 +119,7 @@ local function get_size(size)
|
||||
if type(size) == "number" then
|
||||
return size
|
||||
elseif type(size) == "function" then
|
||||
return size()
|
||||
return get_size(size())
|
||||
end
|
||||
local size_as_number = tonumber(size:sub(0, -2))
|
||||
local percent_as_decimal = size_as_number / 100
|
||||
|
||||
Reference in New Issue
Block a user