Skip to content

Commit 829f57f

Browse files
authoredJan 23, 2024
Merge pull request #13083 from nestjs/fix/non-unique-hashes
fix: generate unique hashes for dynamic modules, and clients
2 parents bfca362 + 9e8f25d commit 829f57f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed
 

‎packages/common/module-utils/configurable-module.builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export class ConfigurableModuleBuilder<
209209
const providers: Array<Provider> = [
210210
{
211211
provide: self.options.optionsInjectionToken,
212-
useFactory: () => this.omitExtras(options, self.extras),
212+
useValue: this.omitExtras(options, self.extras),
213213
},
214214
];
215215
if (self.options.alwaysTransient) {

‎packages/microservices/module/clients.module.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ export class ClientsModule {
2020
const clients = (clientsOptions || []).map(item => {
2121
return {
2222
provide: item.name,
23-
useFactory: () =>
24-
this.assignOnAppShutdownHook(ClientProxyFactory.create(item)),
23+
useValue: this.assignOnAppShutdownHook(ClientProxyFactory.create(item)),
2524
};
2625
});
2726
return {

0 commit comments

Comments
 (0)
Please sign in to comment.