fix: env should be table
This commit is contained in:
1 parent
2ef9ffb97d
commit
3a1978af0f
2 files changed
+14
-1
No files matched your search
@@ -40,6 +40,13 @@ function M.list_extend(dst, src)
|
|||||||
return dst
|
return dst
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.tbl_extend(dst, src)
|
||||||
|
for key, value in pairs(src) do
|
||||||
|
dst[key] = value
|
||||||
|
end
|
||||||
|
return dst
|
||||||
|
end
|
||||||
|
|
||||||
local function deepcopy(value, seen)
|
local function deepcopy(value, seen)
|
||||||
if type(value) ~= "table" then
|
if type(value) ~= "table" then
|
||||||
return value
|
return value
|
||||||
|
|||||||
@@ -41,7 +41,13 @@ M.envs = {}
|
|||||||
M.windowrules = {}
|
M.windowrules = {}
|
||||||
|
|
||||||
local function collect_modules_prop(module, prop)
|
local function collect_modules_prop(module, prop)
|
||||||
if module[prop] then
|
if not module[prop] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if prop == "envs" then
|
||||||
|
M[prop] = utils.tbl_extend(M[prop], module[prop])
|
||||||
|
else
|
||||||
M[prop] = utils.list_extend(M[prop], module[prop])
|
M[prop] = utils.list_extend(M[prop], module[prop])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in new issue
Block a user