bugfix(microservices) exclude duplicated methods #2557

This commit is contained in:
Kamil Myśliwiec
2019-09-10 13:41:55 +02:00
parent fbb894a10a
commit d3bea8a222

View File

@@ -12,7 +12,8 @@ export class MetadataScanner {
prototype: any,
callback: (name: string) => R,
): R[] {
return iterate([...this.getAllFilteredMethodNames(prototype)])
const methodNames = new Set(this.getAllFilteredMethodNames(prototype));
return iterate(methodNames)
.map(callback)
.filter(metadata => !isNil(metadata))
.toArray();