Skip to content

Commit

Permalink
fix: better handle tab disconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Feb 9, 2022
1 parent c2cbd0d commit bddcd45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/app-frontend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { createApp, connectApp } from './app'
import { setAppConnected } from './features/connection'
import { getBridge } from './features/bridge'

export { setAppConnected } from './features/connection'

/**
* Create the main devtools app. Expects to be called with a shell interface
* which implements a connect method.
Expand Down
3 changes: 2 additions & 1 deletion packages/shell-chrome/src/devtools.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// this script is called when the VueDevtools panel is activated.

import { initDevTools } from '@front'
import { initDevTools, setAppConnected } from '@front'
import { Bridge } from '@vue-devtools/shared-utils'

initDevTools({
Expand All @@ -21,6 +21,7 @@ initDevTools({
let disconnected = false
port.onDisconnect.addListener(() => {
disconnected = true
setAppConnected(false)
})

const bridge = new Bridge({
Expand Down

0 comments on commit bddcd45

Please sign in to comment.