Skip to content

Commit 12728aa

Browse files
committed
update check may be failed by network
1 parent ac8ceb6 commit 12728aa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/methods.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ t = module.exports = {
9696
method: 'GET',
9797
};
9898
function look(error, JSONresponse, body) {
99+
// body may be undefined when connection failed
100+
if (!body) {
101+
console.log(`| [GitHub] | VERSION |: Unable to check for updates!`);
102+
return;
103+
}
104+
99105
var page = JSON.parse(body)
100106
const v = package.version;
101107
if(page.version != v)

0 commit comments

Comments
 (0)