Skip to content

Commit 79056a0

Browse files
fix(core): hotfix - override factory provider in e2e tests
1 parent eda8065 commit 79056a0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/core/injector/instance-wrapper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,14 @@ export class InstanceWrapper<T = any> {
301301
public mergeWith(provider: Provider) {
302302
if ((provider as ValueProvider).useValue) {
303303
this.metatype = null;
304+
this.inject = null;
304305
this.setInstanceByContextId(STATIC_CONTEXT, {
305306
instance: (provider as ValueProvider).useValue,
306307
isResolved: true,
307308
isPending: false,
308309
});
309310
} else if ((provider as ClassProvider).useClass) {
311+
this.inject = null;
310312
this.metatype = (provider as ClassProvider).useClass;
311313
} else if ((provider as FactoryProvider).useFactory) {
312314
this.metatype = (provider as FactoryProvider).useFactory;

0 commit comments

Comments
 (0)