Merge pull request #1832 from mtlewis/proto-loader-fix-early-return

Prevent early return in proto-loader containsDefinition
This commit is contained in:
Michael Lumish 2021-06-28 13:16:13 -07:00 committed by GitHub
commit 9cc82c078b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -583,8 +583,8 @@ function containsDefinition(definitionType: typeof Protobuf.Type | typeof Protob
for (const nested of namespace.nestedArray.sort(compareName)) {
if (nested instanceof definitionType) {
return true;
} else if (isNamespaceBase(nested) && !(nested instanceof Protobuf.Type) && !(nested instanceof Protobuf.Enum)) {
return containsDefinition(definitionType, nested);
} else if (isNamespaceBase(nested) && !(nested instanceof Protobuf.Type) && !(nested instanceof Protobuf.Enum) && containsDefinition(definitionType, nested)) {
return true;
}
}