Skip to content

Commit 924fbde

Browse files
author
Timothy Johnson
committed
Fixes #23
1 parent 0ba5af9 commit 924fbde

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

dest/background.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ function attachScript(tabId, changed) {
5353
)
5454
return
5555

56-
toolsPorts.get(tabId).postMessage({ type: 'init' })
5756
chrome.tabs.executeScript(tabId, {
5857
code: `window.profilerEnabled = ${profilerEnabledList.includes(tabId)}`,
5958
runAt: 'document_start'

rollup.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export default [{
4646
e => e.source == window && port.postMessage(e.data),
4747
false
4848
)
49+
window.addEventListener('unload', () => port.postMessage({ type: 'clear' }))
4950
}`
5051
},
5152
plugins: [ resolve() ]

src/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function resolveEventBubble(node) {
136136

137137
port.onMessage.addListener(msg => {
138138
switch (msg.type) {
139-
case 'init': {
139+
case 'clear': {
140140
selectedNode.set({})
141141
hoveredNodeId.set(null)
142142
rootNodes.set([])

0 commit comments

Comments
 (0)