Skip to content

Commit

Permalink
fix: filters cause
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Aug 5, 2024
1 parent ad1bc7e commit e1f779b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,9 @@ export class TKassa<
if (typeof handler === "function" && typeof filtersOrHandler === "function")
this.listeners.push(async (context, custom) => {
// @ts-expect-error
if ((await filters(context)) === true) return handler(context, custom);
if ((await filtersOrHandler(context)) === true)
// @ts-expect-error
return handler(context, custom);
});

return this;
Expand Down

0 comments on commit e1f779b

Please sign in to comment.