mirror of
https://github.com/TangentFoxy/lovebird.git
synced 2025-07-28 11:02:19 +00:00
Fixed lovebird.print() to handle nil
properly
This commit is contained in:
@@ -476,7 +476,11 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function lovebird.print(...)
|
function lovebird.print(...)
|
||||||
local str = table.concat(lovebird.map({...}, tostring), " ")
|
local t = {}
|
||||||
|
for i = 1, select("#", ...) do
|
||||||
|
table.insert(t, tostring(select(i, ...)))
|
||||||
|
end
|
||||||
|
local str = table.concat(t, " ")
|
||||||
local last = lovebird.lines[#lovebird.lines]
|
local last = lovebird.lines[#lovebird.lines]
|
||||||
if last and str == last.str then
|
if last and str == last.str then
|
||||||
-- Update last line if this line is a duplicate of it
|
-- Update last line if this line is a duplicate of it
|
||||||
|
Reference in New Issue
Block a user