fixed some error
This commit is contained in:
parent
833d219cb4
commit
3f8b0a4570
1 changed files with 8 additions and 4 deletions
12
src/init.lua
12
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue