Skip to content

Commit e36c473

Browse files
rozelematthargett
authored andcommitted
perf(DispatcherHelpers): only assert when debugging (microsoft#1478)
1 parent 6bc316a commit e36c473

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ReactWindows/ReactNative/Bridge/DispatcherHelpers.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ public static void Initialize()
5252
/// </summary>
5353
public static void AssertOnDispatcher()
5454
{
55+
#if DEBUG
5556
if (!IsOnDispatcher())
5657
{
5758
throw new InvalidOperationException("Thread does not have dispatcher access.");
5859
}
60+
#endif
5961
}
6062

6163
/// <summary>

0 commit comments

Comments
 (0)