Permalink
Browse files

Check before overriding global.performance

Reviewed By: gaearon

Differential Revision: D5218876

fbshipit-source-id: 7fbe9ca020774a0c53d8cbb64996680112828709
  • Loading branch information...
bvaughn authored and facebook-github-bot committed Jun 9, 2017
1 parent 2984628 commit 9d4cc7cce4047c265bce231069fb6ef49d26d654
Showing with 3 additions and 1 deletion.
  1. +3 −1 Libraries/Core/InitializeCore.js
@@ -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

0 comments on commit 9d4cc7c

Please sign in to comment.