fix(view): grow condition for left or right was always true for right

This commit is contained in:
kiyan 2022-05-31 20:25:13 +02:00
parent 2002b21be7
commit a0f705995a

View File

@ -201,7 +201,8 @@ local function grow()
end
function M.grow_from_content()
if M.View.adaptive_size and M.View.side == "left" or M.View.side == "right" then
local is_left_or_right = M.View.side == "left" or M.View.side == "right"
if M.View.adaptive_size and is_left_or_right then
grow()
end
end