From ae9f97ab4e34ae40a023fc8e63bf4e055e43e3c7 Mon Sep 17 00:00:00 2001 From: Acker Dawn Apple Date: Tue, 5 Nov 2024 16:45:40 -0500 Subject: [PATCH] new AmqpConnection() should NOT cause an error (#872) * fix no args on new AmqpConnection * Update connection.ts * back to checking if config argument is undefined --------- Co-authored-by: Acker Apple Co-authored-by: Rodrigo --- packages/rabbitmq/src/amqp/connection.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rabbitmq/src/amqp/connection.ts b/packages/rabbitmq/src/amqp/connection.ts index ff0fcab21..465e4a65f 100644 --- a/packages/rabbitmq/src/amqp/connection.ts +++ b/packages/rabbitmq/src/amqp/connection.ts @@ -147,7 +147,7 @@ export class AmqpConnection { this.config = { deserializer: (message) => JSON.parse(message.toString()), serializer: (value) => Buffer.from(JSON.stringify(value)), - logger: config.logger || new Logger(AmqpConnection.name), + logger: config?.logger || new Logger(AmqpConnection.name), ...defaultConfig, ...config, };