diff --git a/React/Profiler/RCTProfile.m b/React/Profiler/RCTProfile.m index 3032de741..c1e37e121 100644 --- a/React/Profiler/RCTProfile.m +++ b/React/Profiler/RCTProfile.m @@ -307,6 +307,10 @@ void RCTProfileInit(RCTBridge *bridge) NSString *RCTProfileEnd(RCTBridge *bridge) { + if (!RCTProfileIsProfiling()) { + return nil; + } + [[NSNotificationCenter defaultCenter] postNotificationName:RCTProfileDidEndProfiling object:nil];