Skip to content

Commit

Permalink
[ReactNative] Fix chrome debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
tadeuzagallo committed May 5, 2015
1 parent 4402c4c commit 65a3da3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion React/Base/RCTBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,8 @@ - (void)initJS
* Register the display link to start sending js calls after everything
* is setup
*/
[_jsDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes];
NSRunLoop *targetRunLoop = [_javaScriptExecutor isKindOfClass:[RCTContextExecutor class]] ? [NSRunLoop currentRunLoop] : [NSRunLoop mainRunLoop];
[_jsDisplayLink addToRunLoop:targetRunLoop forMode:NSRunLoopCommonModes];

[[NSNotificationCenter defaultCenter] postNotificationName:RCTJavaScriptDidLoadNotification
object:_parentBridge
Expand Down

0 comments on commit 65a3da3

Please sign in to comment.