mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 22:45:24 +08:00
Guard against dev menu calling twice
Summary: public The Dev Menu is for some reason eventually calling twice the callbacks, guard against it while we don't fix it. Reviewed By: nicklockwood Differential Revision: D2600470 fb-gh-sync-id: 50c622d2ab64ce50d51572dbfcc076c2765ce582
This commit is contained in:
committed by
facebook-github-bot-8
parent
721c844a30
commit
6532290397
@@ -307,6 +307,10 @@ void RCTProfileInit(RCTBridge *bridge)
|
||||
|
||||
NSString *RCTProfileEnd(RCTBridge *bridge)
|
||||
{
|
||||
if (!RCTProfileIsProfiling()) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:RCTProfileDidEndProfiling
|
||||
object:nil];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user