Skip to content

Commit

Permalink
Do not cast bind.pattern to string because it will fail if its 'undef…
Browse files Browse the repository at this point in the history
…ined'
  • Loading branch information
antoinegomez committed Oct 27, 2017
1 parent da57421 commit baba5a4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/module/register-annotations.ts
Expand Up @@ -66,16 +66,13 @@ export class RegisterAnnotations {
_.data.binds.map(bind => {
if (Array.isArray(bind.pattern)) {
return Observable.forkJoin(bind.pattern.map(pattern => queue.bind(
extractMetadataByDecorator<ExchangeDecoratorInterface>(bind.exchange, 'Exchange').name,
pattern)));
extractMetadataByDecorator<ExchangeDecoratorInterface>(bind.exchange, 'Exchange').name, pattern)));
}

return queue.bind(
extractMetadataByDecorator<ExchangeDecoratorInterface>(bind.exchange, 'Exchange').name,
String(bind.pattern)
extractMetadataByDecorator<ExchangeDecoratorInterface>(bind.exchange, 'Exchange').name, bind.pattern
);
})).map(() => queue);
// )).map(() => queue);
}

return Observable.of(queue);
Expand Down

0 comments on commit baba5a4

Please sign in to comment.