Fixed typo in table.clear

This commit is contained in:
Brandon Blanker Lim-it 2020-03-28 12:30:25 +08:00 committed by GitHub
parent 74a04423bb
commit 4f3c277493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,7 +144,7 @@ if _table.clear == nil then
--useful when multiple references are floating around --useful when multiple references are floating around
--so you cannot just pop a new table out of nowhere --so you cannot just pop a new table out of nowhere
function _table.clear(t) function _table.clear(t)
assert(type(to) == "table", "table.clear - argument 't' must be a table") assert(type(t) == "table", "table.clear - argument 't' must be a table")
local k = next(t) local k = next(t)
while k ~= nil do while k ~= nil do
t[k] = nil t[k] = nil