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

Commit b26e619

Browse files
committed
🐛 Fix autoUpdater short-sight bug
1 parent 3020a7d commit b26e619

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/classes/updateChecker.class.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,20 @@ class UpdateChecker {
3030
this._willfail = true;
3131
}
3232

33-
res.on('data', d => {
33+
let rawData = "";
34+
35+
res.on('data', chunk => {
36+
rawData += chunk;
37+
});
38+
39+
res.on('end', () => {
40+
let d = rawData;
3441
if (this._failed === true) {
3542
// Do nothing, it already failed
3643
} else if (this._willfail) {
3744
this._fail(d.toString());
3845
} else {
46+
console.log(d.toString());
3947
try {
4048
let release = JSON.parse(d.toString());
4149
if (release.tag_name.slice(1) === current) {

0 commit comments

Comments
 (0)