mirror of https://github.com/grpc/grpc-node.git
Native: Protobuf.js 6: use nested again
This commit is contained in:
parent
d43508d096
commit
effeba7e78
|
@ -135,11 +135,13 @@ exports.loadObject = function loadObject(value, options) {
|
|||
return client.makeClientConstructor(service_attrs);
|
||||
}
|
||||
|
||||
if (value.hasOwnProperty('nestedArray')) {
|
||||
if (value.hasOwnProperty('nested')) {
|
||||
// It's a namespace or root object
|
||||
value.nestedArray.forEach(nested => {
|
||||
result[nested.name] = loadObject(nested, options);
|
||||
});
|
||||
if (value.nested !== null && value.nested !== undefined) {
|
||||
Object.values(value.nested).forEach(nested => {
|
||||
result[nested.name] = loadObject(nested, options);
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue