Skip to content

Commit

Permalink
Fix a TypeError loading a non-existent proto file.
Browse files Browse the repository at this point in the history
The issue: #876

This is an obvious typo; `typeof` has to return a string `'undefined'`, not a literal `undefined.`
  • Loading branch information
the9000 committed May 20, 2019
1 parent 2ab15fe commit 8f72412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/proto-loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8f72412

Please sign in to comment.