From 5ea2b4e1a19710cf5148964ee331c0e8fe32a4af Mon Sep 17 00:00:00 2001 From: andrewvsk <32568147+andrewvsk@users.noreply.github.com> Date: Mon, 7 Oct 2024 09:41:40 +0300 Subject: [PATCH] fix(sqs-service): getQueueInfo() - cannot read properties of undefined (reading 'instance') (#87) --- lib/sqs.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sqs.service.ts b/lib/sqs.service.ts index ea85b42..3a722c0 100644 --- a/lib/sqs.service.ts +++ b/lib/sqs.service.ts @@ -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; };