Skip to content

Commit

Permalink
Don't construct object graph string while validating without issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Nezz committed Jan 21, 2025
1 parent ea4413e commit 90451c5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ public DiContainer CreateSubContainer(List<TypeValuePair> args, InjectContext co
if (_subContainer == null)
{
#if !ZEN_MULTITHREADING
Assert.That(!_isLookingUp,
"Found unresolvable circular dependency when looking up sub container! Object graph:\n {0}", context.GetObjectGraphString());
if (this._isLookingUp)
{
Assert.That(false, "Found unresolvable circular dependency when looking up sub container! Object graph:\n {0}", context.GetObjectGraphString());
}
_isLookingUp = true;
#endif

Expand All @@ -48,7 +50,7 @@ public DiContainer CreateSubContainer(List<TypeValuePair> args, InjectContext co

Assert.IsNotNull(_subContainer);
}
else
else
{
injectAction = null;
}
Expand Down

0 comments on commit 90451c5

Please sign in to comment.