Skip to content

Commit

Permalink
fix(grpc-sdk): route rpc strings not generated for function names com…
Browse files Browse the repository at this point in the history
…prised of registered subsets" (#65)

Example: 'PostLogin' wouldn't register after 'PostLoginNew'
  • Loading branch information
kon14 committed Mar 4, 2022
1 parent c77382d commit 51e14b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/grpc-sdk/src/helpers/RoutingUtilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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 '';
}

Expand Down

0 comments on commit 51e14b8

Please sign in to comment.