Skip to content

Commit

Permalink
πŸ› fix clear events on refresh
Browse files Browse the repository at this point in the history
Do not clear events when an unrelated page is refreshed
  • Loading branch information
BenoitZugmeyer committed Nov 29, 2023
1 parent 287970a commit 076087b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion developer-extension/src/panel/hooks/useEvents/useEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function useEvents({
useEffect(() => {
if (!preserveEvents) {
const clearCurrentEvents = (details: chrome.webNavigation.WebNavigationTransitionCallbackDetails) => {
if (details.transitionType === 'reload') {
if (details.transitionType === 'reload' && details.tabId === chrome.devtools.inspectedWindow.tabId) {
clearEvents()
}
}
Expand Down

0 comments on commit 076087b

Please sign in to comment.