Skip to content

Commit c070ce6

Browse files
author
msacca
committed
fixed timeout authetication for JSONP - defaults back to popular
1 parent 8144cae commit c070ce6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.DS_Store

6 KB
Binary file not shown.

js/app.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@ var drib = {
2121
$.ajax({
2222
url: url,
2323
dataType: 'jsonp',
24-
timeout: 2000,
25-
success: function(data) {
24+
timeout: 1000,
25+
success: function(data) {
2626
console.log('did the thing');
27-
cb(data);
27+
cb(data);
2828
},
2929
error: function(x, t, m) {
3030
if(t==="timeout") {
3131
console.log('timeout error');
32-
popularShots.buildShots(data.shots);
32+
drib.getPopular();
3333
} else {
3434
console.log('else timeout error');
35-
popularShots.buildShots(data.shots);
35+
drib.getPopular();
3636
}
3737
}
38-
}
39-
40-
}
38+
});
39+
}
40+
}
4141

4242
var popularShots = {
4343
container:$('#picsList'),

0 commit comments

Comments
 (0)