File tree 3 files changed +2
-4
lines changed 3 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -75,5 +75,4 @@ class App {
75
75
}
76
76
77
77
const HYF_REPOS_URL = 'https://api.github.com/orgs/HackYourFuture/repos?per_page=100' ;
78
-
79
78
window . onload = ( ) => new App ( HYF_REPOS_URL ) ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class Util {
22
22
xhr . open ( 'GET' , url ) ;
23
23
xhr . responseType = 'json' ;
24
24
xhr . onload = ( ) => {
25
- if ( xhr . status < 400 ) {
25
+ if ( xhr . status >= 200 && xhr . status <= 299 ) {
26
26
resolve ( xhr . response ) ;
27
27
} else {
28
28
reject ( new Error ( `Network error: ${ xhr . status } - ${ xhr . statusText } ` ) ) ;
Original file line number Diff line number Diff line change 6
6
xhr . open ( 'GET' , url ) ;
7
7
xhr . responseType = 'json' ;
8
8
xhr . onload = ( ) => {
9
- if ( xhr . status < 400 ) {
9
+ if ( xhr . status >= 200 && xhr . status <= 299 ) {
10
10
cb ( null , xhr . response ) ;
11
11
} else {
12
12
cb ( new Error ( `Network error: ${ xhr . status } - ${ xhr . statusText } ` ) ) ;
42
42
}
43
43
44
44
const HYF_REPOS_URL = 'https://api.github.com/orgs/HackYourFuture/repos?per_page=100' ;
45
-
46
45
window . onload = ( ) => main ( HYF_REPOS_URL ) ;
47
46
}
You can’t perform that action at this time.
0 commit comments