Skip to content
This repository has been archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
optional chaning on logger const
Browse files Browse the repository at this point in the history
  • Loading branch information
onur-ozkan committed Apr 10, 2021
1 parent 4df011a commit a3eaf85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rate-limiter.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class RateLimiterInterceptor implements NestInterceptor {
libraryArguments.execEvenlyMinDelayMs = (this.options.duration * 1000) / this.options.points

if (!rateLimiter) {
const logger = this.specificOptions.logger
const logger = this.specificOptions?.logger || this.options.logger
switch (this.specificOptions?.type || this.options.type) {
case 'Memory':
rateLimiter = new RateLimiterMemory(libraryArguments)
Expand Down

0 comments on commit a3eaf85

Please sign in to comment.