Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
Update latest-update.js
Browse files Browse the repository at this point in the history
Found this because my fiber isn't connected yet but I am on my wifi. When I get a dns lookup error, the whole app blows up.
  • Loading branch information
pietgeursen committed Jul 31, 2018
1 parent f6309ea commit af80d5a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/latest-update.js
Expand Up @@ -29,6 +29,11 @@ module.exports = function () {
})
}
})

// You must handle the error here otherwise you get an unhandled error exception which stops the whole app.
req.on('error', function (error) {
console.log('error trying to reach github to check for latest patchwork version: ', error)
})

var obs = computed([update, hidden], (update, hidden) => update && !hidden ? update : false)
obs.ignore = () => hidden.set(true)
Expand Down

0 comments on commit af80d5a

Please sign in to comment.