Skip to content

Commit

Permalink
handle non-promise variant as well
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Sep 4, 2023
1 parent 194e91f commit b583342
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ async function connect (options) {
}, {
signal: errorAbortController
})
window.addEventListener('error', (e) => {
handleError(e.message)
}, {
signal: errorAbortController.signal
})
const bot = mineflayer.createBot({
host,
port,
Expand Down

0 comments on commit b583342

Please sign in to comment.