mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::js: Remove trap tree traversal in the virtual default.
This commit is contained in:
parent
88fd6971ec
commit
29b384ca0f
1 changed files with 2 additions and 11 deletions
13
ircd/js.cc
13
ircd/js.cc
|
@ -1142,7 +1142,7 @@ ircd::js::trap::on_enu(object::handle)
|
|||
|
||||
bool
|
||||
ircd::js::trap::on_has(object::handle,
|
||||
id::handle)
|
||||
id::handle id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1166,16 +1166,7 @@ ircd::js::trap::on_get(object::handle obj,
|
|||
id::handle id,
|
||||
value::handle val)
|
||||
{
|
||||
if(!undefined(val))
|
||||
return val;
|
||||
|
||||
const string name(id);
|
||||
const auto it(children.find(name));
|
||||
if(it == end(children))
|
||||
return val;
|
||||
|
||||
auto &child(*it->second);
|
||||
return child(obj);
|
||||
return val;
|
||||
}
|
||||
|
||||
ircd::js::value
|
||||
|
|
Loading…
Reference in a new issue