mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-16 10:39:50 +08:00
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:
committed by
Facebook Github Bot
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) {
|
||||
|
||||
Reference in New Issue
Block a user