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

Commit

Permalink
🐛 Fix autoUpdater short-sight bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed Nov 20, 2018
1 parent 3020a7d commit b26e619
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/classes/updateChecker.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,20 @@ class UpdateChecker {
this._willfail = true;
}

res.on('data', d => {
let rawData = "";

res.on('data', chunk => {
rawData += chunk;
});

res.on('end', () => {
let d = rawData;
if (this._failed === true) {
// Do nothing, it already failed
} else if (this._willfail) {
this._fail(d.toString());
} else {
console.log(d.toString());
try {
let release = JSON.parse(d.toString());
if (release.tag_name.slice(1) === current) {
Expand Down

0 comments on commit b26e619

Please sign in to comment.