Skip to content

Commit

Permalink
fix: clean events on refresh (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
hootlex authored and Akryum committed Aug 2, 2018
1 parent f310b0f commit c5de65f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const internalRE = /^(?:pre-)?hook:/
export function initEventsBackend (Vue, bridge) {
let recording = true

bridge.send('events:reset')

bridge.on('events:toggle-recording', enabled => {
recording = enabled
})
Expand Down
4 changes: 4 additions & 0 deletions src/devtools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ function initApp (shell) {
}
})

bridge.on('events:reset', () => {
store.commit('events/RESET')
})

bridge.on('inspect-instance', id => {
ensurePaneShown(() => {
inspectInstance(id)
Expand Down

0 comments on commit c5de65f

Please sign in to comment.