Assign correct path attribute to nodes
This commit is contained in:
parent
47f8c9c71a
commit
d0939b4e33
1 changed files with 2 additions and 2 deletions
|
@ -438,7 +438,6 @@ function node(...)
|
|||
local c = _create_node({...})
|
||||
|
||||
c.module = getfenv(2)._NAME
|
||||
c.path = arg
|
||||
c.auto = nil
|
||||
|
||||
return c
|
||||
|
@ -454,10 +453,11 @@ function _create_node(path, cache)
|
|||
local c = cache[name]
|
||||
|
||||
if not c then
|
||||
local new = {nodes={}, auto=true, path=util.clone(path)}
|
||||
local last = table.remove(path)
|
||||
|
||||
c = _create_node(path, cache)
|
||||
|
||||
local new = {nodes={}, auto=true}
|
||||
c.nodes[last] = new
|
||||
cache[name] = new
|
||||
|
||||
|
|
Loading…
Reference in a new issue