diff --git a/libraries/grpc-sdk/src/helpers/RoutingUtilities.ts b/libraries/grpc-sdk/src/helpers/RoutingUtilities.ts index 800bf2835..bcf8c73e7 100644 --- a/libraries/grpc-sdk/src/helpers/RoutingUtilities.ts +++ b/libraries/grpc-sdk/src/helpers/RoutingUtilities.ts @@ -90,7 +90,7 @@ function createProtoFunctionsForSocket( Object.keys(events).forEach((event) => { const newFunction = createGrpcFunctionName(events[event].grpcFunction); - if (protoFunctions.indexOf(newFunction) !== -1) { + if (protoFunctions.indexOf(`rpc ${newFunction}(`) !== -1) { return; } @@ -103,7 +103,7 @@ function createProtoFunctionsForSocket( function createProtoFunctionForRoute(path: any, protoFunctions: string) { const newFunction = createGrpcFunctionName(path.grpcFunction); - if (protoFunctions.indexOf(newFunction) !== -1) { + if (protoFunctions.indexOf(`rpc ${newFunction}(`) !== -1) { return ''; }