Skip to content

Commit

Permalink
devtools: dont restore profiling data if we're profling (facebook#22753)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored and zhengjitf committed Apr 15, 2022
1 parent 11831b4 commit f911855
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-devtools-extensions/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f911855

Please sign in to comment.