File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,5 +75,4 @@ class App {
7575}
7676
7777const HYF_REPOS_URL = 'https://api.github.com/orgs/HackYourFuture/repos?per_page=100' ;
78-
7978window . onload = ( ) => new App ( HYF_REPOS_URL ) ;
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class Util {
2222 xhr . open ( 'GET' , url ) ;
2323 xhr . responseType = 'json' ;
2424 xhr . onload = ( ) => {
25- if ( xhr . status < 400 ) {
25+ if ( xhr . status >= 200 && xhr . status <= 299 ) {
2626 resolve ( xhr . response ) ;
2727 } else {
2828 reject ( new Error ( `Network error: ${ xhr . status } - ${ xhr . statusText } ` ) ) ;
Original file line number Diff line number Diff line change 66 xhr . open ( 'GET' , url ) ;
77 xhr . responseType = 'json' ;
88 xhr . onload = ( ) => {
9- if ( xhr . status < 400 ) {
9+ if ( xhr . status >= 200 && xhr . status <= 299 ) {
1010 cb ( null , xhr . response ) ;
1111 } else {
1212 cb ( new Error ( `Network error: ${ xhr . status } - ${ xhr . statusText } ` ) ) ;
4242 }
4343
4444 const HYF_REPOS_URL = 'https://api.github.com/orgs/HackYourFuture/repos?per_page=100' ;
45-
4645 window . onload = ( ) => main ( HYF_REPOS_URL ) ;
4746}
You can’t perform that action at this time.
0 commit comments