Skip to content

Commit

Permalink
new AmqpConnection() should NOT cause an error (#872)
Browse files Browse the repository at this point in the history
* fix no args on new AmqpConnection

* Update connection.ts

* back to checking if config argument is undefined

---------

Co-authored-by: Acker Apple <y>
Co-authored-by: Rodrigo <[email protected]>
  • Loading branch information
AckerApple and underfisk authored Nov 5, 2024
1 parent 9a02e8b commit ae9f97a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/rabbitmq/src/amqp/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit ae9f97a

Please sign in to comment.