Skip to content

Commit

Permalink
fix(middleware): resolve lint issue
Browse files Browse the repository at this point in the history
resolve lint issues

GH-174
  • Loading branch information
Surbhi-sharma1 committed Jun 5, 2024
1 parent ab6f64f commit b83ca75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/middleware/ratelimit.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export class RatelimitMiddlewareProvider implements Provider<Middleware> {
});
if (enabledByDefault === true) {
await promise;
} else if (enabledByDefault === false && metadata && metadata.enabled) {
}
if (enabledByDefault || metadata?.enabled) {
await promise;
} else {
return Promise.resolve();
Expand Down
3 changes: 2 additions & 1 deletion src/providers/ratelimit-action.provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ export class RatelimitActionProvider implements Provider<RateLimitAction> {
});
if (enabledByDefault === true) {
await promise;
} else if (enabledByDefault === false && metadata && metadata.enabled) {
}
if (enabledByDefault || metadata?.enabled) {
await promise;
} else {
return Promise.resolve();
Expand Down

0 comments on commit b83ca75

Please sign in to comment.