Skip to content

Commit b292946

Browse files
committed
proto-loader: Avoid generating duplicate method declarations in some cases
1 parent 5674498 commit b292946

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/proto-loader/bin/proto-loader-gen-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ function generateServiceClientInterface(formatter: TextFormatter, serviceType: P
555555
formatter.indent();
556556
for (const methodName of Object.keys(serviceType.methods).sort()) {
557557
const method = serviceType.methods[methodName];
558-
for (const name of [methodName, camelCase(methodName)]) {
558+
for (const name of new Set([methodName, camelCase(methodName)])) {
559559
if (CLIENT_RESERVED_METHOD_NAMES.has(name)) {
560560
continue;
561561
}

0 commit comments

Comments
 (0)