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

Reviewed By: gaearon

Differential Revision: D6448731

fbshipit-source-id: 8c8c6ff393e452c863f54c83c2e4394fd535dfc5
This commit is contained in:
Alexey Lang authored and Facebook Github Bot committed 2017-12-01 02:46:18 -08:00
1 parent 4fdaf2de98
commit dfebcb70a5
1 file changed
+3 -1
+3 -1
View File
@@ -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) {