From bc7754ae0b04b785cce73596fa8b313b36acc6ea Mon Sep 17 00:00:00 2001 From: Max Cahill <1bardesign@gmail.com> Date: Tue, 4 May 2021 10:38:31 +1000 Subject: [PATCH] [modified] minor refactor of how `tablex.clear` is or isn't initialised as needed --- tablex.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tablex.lua b/tablex.lua index 80a6694..020fa83 100644 --- a/tablex.lua +++ b/tablex.lua @@ -247,10 +247,7 @@ function tablex.dedupe(t) end --(might already exist depending on luajit) -if table.clear then - --import from global if it exists - tablex.clear = table.clear -else +if not tablex.clear then --remove all values from a table --useful when multiple references are being held --so you cannot just create a new table