Skip to content

Commit 5e8ac76

Browse files
committed
Merge pull request github-tools#13 from mattpass/master
Avoiding callback errors
2 parents 5d069f3 + 52dc1d1 commit 5e8ac76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

github.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
xhr.onreadystatechange = function () {
2121
if (this.readyState == 4) {
2222
if (this.status >= 200 && this.status < 300 || this.status === 304) {
23-
cb(null, raw ? this.responseText : JSON.parse(this.responseText));
23+
cb(null, raw ? this.responseText : this.responseText ? JSON.parse(this.responseText) : true);
2424
} else {
2525
cb(this.status);
2626
}

0 commit comments

Comments
 (0)