mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
bugfix(microservices) exclude duplicated methods #2557
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user