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:
parent
4fdaf2de98
commit
dfebcb70a5
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue