Skip to content

Commit

Permalink
ts-web/core: switch to newly exported getName
Browse files Browse the repository at this point in the history
  • Loading branch information
pro-wh committed Feb 28, 2022
1 parent cbd7ad9 commit 6065330
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions client-sdk/ts-web/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,7 @@ export class GRPCWrapper {
desc: grpcWeb.MethodDescriptor<REQ, RESP>,
request: REQ,
): Promise<RESP> {
// @ts-expect-error missing declaration
const name = desc.name;
const method = this.base + name;
const method = this.base + desc.getName();
// Some browsers with enormous market share aren't able to preserve the stack between here
// and our `.catch` callback below. Save a copy explicitly.
const invocationStack = new Error().stack;
Expand Down Expand Up @@ -634,9 +632,7 @@ End of invocation stack`;
desc: grpcWeb.MethodDescriptor<REQ, RESP>,
request: REQ,
): grpcWeb.ClientReadableStream<RESP> {
// @ts-expect-error missing declaration
const name = desc.name;
return this.client.serverStreaming(this.base + name, request, null, desc);
return this.client.serverStreaming(this.base + desc.getName(), request, null, desc);
}
}

Expand Down

0 comments on commit 6065330

Please sign in to comment.