Skip to content

Commit 5ea2b4e

Browse files
authored
fix(sqs-service): getQueueInfo() - cannot read properties of undefined (reading 'instance') (#87)
1 parent ca3934d commit 5ea2b4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/sqs.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class SqsService implements OnModuleInit, OnModuleDestroy {
9797
throw new Error(`Consumer/Producer does not exist: ${name}`);
9898
}
9999

100-
const { sqs, queueUrl } = (this.consumers.get(name).instance ?? this.producers.get(name)) as {
100+
const { sqs, queueUrl } = (this.consumers.get(name)?.instance ?? this.producers.get(name)) as {
101101
sqs: SQSClient;
102102
queueUrl: string;
103103
};

0 commit comments

Comments
 (0)