added standard, ci and format fixes (#76)

Co-authored-by: rafapaezbas <rafa@holepunch.com>
This commit is contained in:
rafapaezbas
2024-02-26 17:44:19 +01:00
committed by GitHub
parent 308705982b
commit 4230a61c13
5 changed files with 41 additions and 6 deletions

View File

@@ -236,7 +236,6 @@ customElements.define('developer-tooling', class extends HTMLElement {
this.initServer()
})
const shouldLoadApp = Pear.config.linkData?.startsWith('devtools/')
if (shouldLoadApp) {
this.addApp(Pear.config.linkData)
@@ -327,7 +326,9 @@ customElements.define('developer-tooling', class extends HTMLElement {
this.render()
this.changePortFormElem.classList.add('hidden')
})
this.devtoolsHttpServer.on('error', err => this.changePortErrorElem.textContent = err?.message)
this.devtoolsHttpServer.on('error', err => {
this.changePortErrorElem.textContent = err?.message
})
this.devtoolsHttpServer.on('request', (req, res) => {
if (req.url !== '/json/list') {
res.writeHead(404)