Fix a TypeError loading a non-existent proto file.

The issue: https://github.com/grpc/grpc-node/issues/876

This is an obvious typo; `typeof` has to return a string `'undefined'`, not a literal `undefined.`
This commit is contained in:
Dmitry Cheryasov 2019-05-20 15:36:15 -05:00 committed by GitHub
parent 2ab15fef4f
commit 8f724121a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ function getAllHandledReflectionObjects(
if (isHandledReflectionObject(obj)) {
return [[objName, obj]];
} else {
if (isNamespaceBase(obj) && typeof obj.nested !== undefined) {
if (isNamespaceBase(obj) && typeof obj.nested !== 'undefined') {
return Object.keys(obj.nested!)
.map((name) => {
return getAllHandledReflectionObjects(obj.nested![name], objName);