Correcting rebase

This commit is contained in:
Tobias Baunbaek
2024-01-26 14:48:06 +01:00
parent 6c94ce0c76
commit ac3be00002
2 changed files with 7 additions and 11 deletions

View File

@@ -131,27 +131,24 @@ customElements.define('devtools-inspector', class extends HTMLElement {
const { publicKey, inspectorSession } = app
inspectorSession.connect()
app.connected = true
this.renderApps()
const onMessage = msg => {
const { pearInspectMethod } = msg
const isACDPMessage = !pearInspectMethod
if (isACDPMessage) return devtoolsSocket.send(JSON.stringify(msg))
}
inspectorSession.connect()
inspectorSession.on('message', onMessage)
devtoolsSocket.on('message', msg => {
inspectorSession.post(JSON.parse(msg))
})
devtoolsSocket.on('message', msg => inspectorSession.post(JSON.parse(msg)))
devtoolsSocket.on('close', () => {
console.log('devtoolsSocket on(close)')
app.connected = false
inspectorSession.disconnect()
inspectorSession.off('message', onMessage)
app.connected = false
this.renderApps()
})
app.connected = true
this.renderApps()
})
}