Permalink
Browse files

Don't set global.performance to undefined if it was initialized already

Reviewed By: gaearon

Differential Revision: D6448731

fbshipit-source-id: 8c8c6ff393e452c863f54c83c2e4394fd535dfc5
  • Loading branch information...
alexeylang authored and facebook-github-bot committed Dec 1, 2017
1 parent 4fdaf2d commit dfebcb70a5c948db94d1cd580bbcaa0aaa702349
Showing with 3 additions and 1 deletion.
  1. +3 −1 Libraries/Performance/Systrace.js
@@ -161,7 +161,9 @@ const Systrace = {
}
if (_canInstallReactHook) {
if (_useFiber) {
global.performance = enabled ? userTimingPolyfill : undefined;
if (enabled && global.performance === undefined) {
global.performance = userTimingPolyfill;
}
} else {
const ReactDebugTool = require('ReactDebugTool');
if (enabled) {

0 comments on commit dfebcb7

Please sign in to comment.