Check before overriding global.performance
Reviewed By: gaearon Differential Revision: D5218876 fbshipit-source-id: 7fbe9ca020774a0c53d8cbb64996680112828709
This commit is contained in:
parent
2984628357
commit
9d4cc7cce4
|
@ -100,7 +100,9 @@ if (!global.process.env.NODE_ENV) {
|
|||
const Systrace = require('Systrace');
|
||||
Systrace.setEnabled(global.__RCTProfileIsProfiling || false);
|
||||
if (__DEV__) {
|
||||
global.performance = Systrace.getUserTimingPolyfill();
|
||||
if (global.performance === undefined) {
|
||||
global.performance = Systrace.getUserTimingPolyfill();
|
||||
}
|
||||
}
|
||||
|
||||
// Set up console
|
||||
|
|
Loading…
Reference in New Issue