mirror of https://github.com/grpc/grpc-node.git
				
				
				
			Merge pull request #678 from murgatroid99/native_protojs6_each_fix2
Native: Protobuf.js 6: use nested again
This commit is contained in:
		
						commit
						07c7ac4532
					
				|  | @ -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