Update localstorage.lua

This commit is contained in:
nianhua
2024-06-26 02:35:42 +08:00
committed by GitHub
parent 92f9b6392e
commit a8a1261f7b

View File

@@ -6,9 +6,14 @@ localstorage.__index = localstorage
创建一个新的 fw_localstorage 对象
@return 返回一个新的 fw_localstorage 对象
]]
function localstorage.new()
function localstorage.new(db)
local instance = setmetatable({}, localstorage)
if db == nil then
instance.module = fw_localstorage.new()
else
instance.module = db
end
return instance
end