Skip to content

Commit

Permalink
Merge pull request #40 from Kevalin/master
Browse files Browse the repository at this point in the history
fix / compatible with other amqp libraries
  • Loading branch information
AlariCode authored Aug 17, 2021
2 parents d94fbce + 666f8d1 commit fe771bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rmq.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class RMQService implements OnModuleInit {
}, timeout);
this.sendResponseEmitter.once(correlationId, (msg: Message) => {
clearTimeout(timerId);
if (msg.properties.headers['-x-error']) {
if (msg.properties?.headers?.['-x-error']) {
reject(this.errorService.errorHandler(msg));
}
const { content } = msg;
Expand Down

0 comments on commit fe771bb

Please sign in to comment.