mirror of
https://github.com/rxi/lovebird.git
synced 2024-11-15 22:54:21 +00:00
Fixed lovebird.print() to handle nil
properly
This commit is contained in:
parent
1e4eb39820
commit
c63651cce2
@ -476,7 +476,11 @@ end
|
||||
|
||||
|
||||
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]
|
||||
if last and str == last.str then
|
||||
-- Update last line if this line is a duplicate of it
|
||||
|
Loading…
Reference in New Issue
Block a user