Skip to content

Commit

Permalink
fix(sqs-service): getQueueInfo() - cannot read properties of undefine…
Browse files Browse the repository at this point in the history
…d (reading 'instance') (#87)
  • Loading branch information
andrewvsk authored Oct 7, 2024
1 parent ca3934d commit 5ea2b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sqs.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class SqsService implements OnModuleInit, OnModuleDestroy {
throw new Error(`Consumer/Producer does not exist: ${name}`);
}

const { sqs, queueUrl } = (this.consumers.get(name).instance ?? this.producers.get(name)) as {
const { sqs, queueUrl } = (this.consumers.get(name)?.instance ?? this.producers.get(name)) as {
sqs: SQSClient;
queueUrl: string;
};
Expand Down

0 comments on commit 5ea2b4e

Please sign in to comment.