Skip to content

Commit f29ad4d

Browse files
do not alias self
Signed-off-by: Xavier Geerinck <[email protected]>
1 parent 6101b6a commit f29ad4d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/actors/client/ActorProxyBuilder.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ export default class ActorProxyBuilder<T> {
5050
}
5151

5252
build(actorId?: ActorId | string): T {
53-
const self = this;
5453
const actorIdParsed = actorId ? (actorId instanceof ActorId ? actorId : new ActorId(actorId)) : ActorId.createRandomId();
54+
const actorClient = this.actorClient;
55+
const actorTypeName = this.actorTypeName;
5556

5657
// Create an instance of the abstract class to inspect its methods
5758
// This won't be used directly but helps with method discovery
@@ -69,7 +70,7 @@ export default class ActorProxyBuilder<T> {
6970
// Proxy the method call to the actor client
7071
return async function (...args: any) {
7172
const body = args.length > 0 ? args : null;
72-
const res = await self.actorClient.actor.invoke(self.actorTypeName, actorIdParsed, prop, body);
73+
const res = await actorClient.actor.invoke(actorTypeName, actorIdParsed, prop, body);
7374
return res;
7475
};
7576
},

0 commit comments

Comments
 (0)