Skip to content

Commit 7afc798

Browse files
fix(core): fix infinite loop on broken cicular reference #14799
1 parent 9a1a69b commit 7afc798

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/core/injector/instance-wrapper.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,13 @@ export class InstanceWrapper<T = any> {
126126
const instancePerContext = this.values.get(contextId);
127127
return instancePerContext
128128
? instancePerContext
129-
: this.cloneStaticInstance(contextId);
129+
: contextId !== STATIC_CONTEXT
130+
? this.cloneStaticInstance(contextId)
131+
: {
132+
instance: null as T,
133+
isResolved: true,
134+
isPending: false,
135+
};
130136
}
131137

132138
public getInstanceByInquirerId(

0 commit comments

Comments
 (0)