Only register methods with members

This commit is contained in:
Kevin Sawicki 2016-08-16 10:56:23 -07:00
parent 600076b46d
commit 3245bb99b2

View file

@ -95,8 +95,10 @@ let valueToMeta = function (sender, value, optimizeSimpleObject = false) {
meta.members.forEach((member) => {
if (member.type === 'method') {
const method = value[member.name]
member.id = objectsRegistry.add(sender, method)
member.members = getObjectMembers(method)
if (member.members.length > 0) {
member.id = objectsRegistry.add(sender, method)
}
}
})
} else if (meta.type === 'buffer') {