Skip to content

Commit 844ed84

Browse files
authored
Avoid the exception during Dispose by only calling SetObject() when there is a HttpContext (#1219)
1 parent 7a022bd commit 844ed84

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/React.Web/TinyIoCAspNetExtensions.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ public void ReleaseObject()
6363
var item = GetObject() as IDisposable;
6464

6565
if (item != null)
66+
{
6667
item.Dispose();
67-
68-
SetObject(null);
68+
SetObject(null);
69+
}
6970
}
7071

7172
/// <summary>

0 commit comments

Comments
 (0)