Skip to content

Commit 61d114f

Browse files
committed
added error handling to events
1 parent 5ed2928 commit 61d114f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

assets/scripts/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ var Events = {
3232
$target.addClass('active');
3333
},
3434
displayEvents : function (response) {
35+
if (response.error !== undefined) {
36+
$('#event-list-cta').html('<h4>There was an error getting our events.</h4>');
37+
}
38+
3539
if (response.items.length === 0) {
3640
$('#event-list-cta').html('<h4>There are no upcoming events.</h4>');
3741
return false;

0 commit comments

Comments
 (0)