Skip to content

Commit ef09c85

Browse files
authored
fix(DispatcherHelpers): Ensure correct dispatcher check (microsoft#1372)
Previously, the `IsOnDispatcher` check was for any dispatcher. Now, the dispatcher check is associated with the main window. Fixes microsoft#1371
1 parent 4fc2c6c commit ef09c85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactWindows/ReactNative/Bridge/DispatcherHelpers.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void AssertOnDispatcher()
3030
/// </returns>
3131
public static bool IsOnDispatcher()
3232
{
33-
return CoreWindow.GetForCurrentThread()?.Dispatcher != null;
33+
return CoreWindow.GetForCurrentThread()?.Dispatcher == CoreApplication.MainView.CoreWindow.Dispatcher;
3434
}
3535

3636
/// <summary>

0 commit comments

Comments
 (0)