@tstdl/base 0.82.51 → 0.82.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/container/container.js +2 -2
- package/package.json +1 -1
package/container/container.js
CHANGED
|
@@ -128,7 +128,7 @@ class Container {
|
|
|
128
128
|
}
|
|
129
129
|
// eslint-disable-next-line max-statements, max-lines-per-function, complexity
|
|
130
130
|
_resolve(token, optional, _argument, context, chain, isFirst) {
|
|
131
|
-
if ((chain.length >
|
|
131
|
+
if ((chain.length > 750) || (++context.resolves > 750)) {
|
|
132
132
|
throw new resolve_error_js_1.ResolveError('Resolve stack overflow. This can happen on circular dependencies with transient lifecycles and self reference. Use scoped or singleton lifecycle instead or @forwardRef().', chain);
|
|
133
133
|
}
|
|
134
134
|
if ((0, type_guards_js_1.isUndefined)(token)) {
|
|
@@ -243,7 +243,7 @@ class Container {
|
|
|
243
243
|
}
|
|
244
244
|
// eslint-disable-next-line max-statements, max-lines-per-function, complexity
|
|
245
245
|
async _resolveAsync(token, optional, _argument, context, chain, isFirst) {
|
|
246
|
-
if ((chain.length >
|
|
246
|
+
if ((chain.length > 750) || (++context.resolves > 750)) {
|
|
247
247
|
throw new resolve_error_js_1.ResolveError('Resolve stack overflow. This can happen on circular dependencies with transient lifecycles and self reference. Use scoped or singleton lifecycle instead or @forwardRef().', chain);
|
|
248
248
|
}
|
|
249
249
|
if ((0, type_guards_js_1.isUndefined)(token)) {
|