From f86cd5408b3154b3aa55ca6d9d86aa3091b7b2e5 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Mon, 15 Nov 2021 15:46:17 +0000 Subject: [PATCH] devtools: dont restore profiling data if we're profling (#22753) --- packages/react-devtools-extensions/src/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-devtools-extensions/src/main.js b/packages/react-devtools-extensions/src/main.js index 015472fa2e..2d67aa2cd7 100644 --- a/packages/react-devtools-extensions/src/main.js +++ b/packages/react-devtools-extensions/src/main.js @@ -156,7 +156,9 @@ function createPanelIfReactLoaded() { supportsTimeline: isChrome, supportsTraceUpdates: true, }); - store.profilerStore.profilingData = profilingData; + if (!isProfiling) { + store.profilerStore.profilingData = profilingData; + } // Initialize the backend only once the Store has been initialized. // Otherwise the Store may miss important initial tree op codes.