Skip to content

Commit

Permalink
refact: bound handler if event esists
Browse files Browse the repository at this point in the history
  • Loading branch information
DIY0R committed Sep 12, 2024
1 parent 174235c commit 6b1b073
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/common/events.discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ export class MetaTegsScannerService {
) {
const method = instance[methodName];
const event = this.getMetaData<string>(metaTeg, method);
const boundHandler = instance[methodName].bind(instance);

if (event) {
const boundHandler = method.bind(instance);
const serdes = this.getSerDesMetaData(method, instance.constructor);
const middlewares = this.getLinesMetaDate<TypeRmqMiddleware>(
method,
Expand Down

0 comments on commit 6b1b073

Please sign in to comment.