From 3f8b0a45706626e334b29f255619a33042d19ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=84=B8=EC=A0=A4=EA=B7=80=20=EA=B3=A0=EC=96=91=EC=9D=B4?= =?UTF-8?q?=EB=93=A4?= <46598063+qwreey75@users.noreply.github.com> Date: Fri, 24 Dec 2021 19:17:00 +0900 Subject: [PATCH] fixed some error --- src/init.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/init.lua b/src/init.lua index 1aca74e..1e4ffc3 100644 --- a/src/init.lua +++ b/src/init.lua @@ -33,9 +33,11 @@ local _,advancedTween = pcall(require,"src.libs.AdvancedTween"); ---@module src. local idSpace = {}; function module.init(id) - local last = idSpace[id]; - if last then - return last; + if id then + local last = idSpace[id]; + if last then + return last; + end end local this = {items = {}}; @@ -51,7 +53,9 @@ function module.init(id) --this.tween = tween; --this.plugin = plugin; - idSpace[id] = this; + if id then + idSpace[id] = this; + end return this; end