diff --git a/CHANGELOG.md b/CHANGELOG.md index 69cf4c4..fb685c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change log +## 2.13.0 + +- Fix error when null response was ignored + ## 2.12.0 - Use native UUID diff --git a/lib/rmq.explorer.ts b/lib/rmq.explorer.ts index 81ad3a4..92116fa 100644 --- a/lib/rmq.explorer.ts +++ b/lib/rmq.explorer.ts @@ -83,7 +83,7 @@ export class RMQExplorer implements OnModuleInit { return; } const result = await methodRef.apply(instance, funcArgs); - if (msg.properties.replyTo && result) { + if (msg.properties.replyTo && result !== undefined) { responseEmitter.emit(ResponseEmitterResult.success, msg, result); } else if (msg.properties.replyTo && result === undefined) { responseEmitter.emit( diff --git a/package.json b/package.json index f71337b..1c0d9b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nestjs-rmq", - "version": "2.12.0", + "version": "2.13.0", "description": "NestJS RabbitMQ Module", "main": "./dist/index.js", "types": "./dist/index.d.ts",