Skip to content

Commit

Permalink
Merge pull request #5 from holepunchto/fix-filename-can-be-undefined
Browse files Browse the repository at this point in the history
Fix crash when filename was undefined
  • Loading branch information
rafapaezbas authored Mar 12, 2024
2 parents a4801a1 + 8d3f9b3 commit 5f444f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ customElements.define('developer-tooling', class extends HTMLElement {
this.render()
})
inspectorSession.on('info', ({ filename }) => {
app.url = filename
app.title = filename.split('/').pop()
app.url = filename || 'untitled'
app.title = filename?.split('/').pop() || 'untitled'
this.apps.set(sessionId, app)
this.render()
})
Expand Down

0 comments on commit 5f444f4

Please sign in to comment.