Permalink
Browse files

Merge pull request #377 from Lukx/master

Network Graph: AjaxLoader & Error Handling for no-more-entries
  • Loading branch information...
2 parents d5d4509 + 0ea9d0d commit 5fd33a90edc9cc66894e98efe9acf2ff059bfce0 @klaussilveira committed Sep 17, 2013
@@ -55,6 +55,7 @@ function ($repo, $commitishPath, $page) use ($app) {
}
$nextPageUrl = null;
+
if ($pager['last'] !== $pager['current']) {
$nextPageUrl = $app['url_generator']->generate(
'networkData',
@@ -65,6 +66,18 @@ function ($repo, $commitishPath, $page) use ($app) {
)
);
}
+
+ // when no commits are given, return an empty response - issue #369
+ if( count($commits) === 0 ) {
+ return $app->json( array(
+ 'repo' => $repo,
+ 'commitishPath' => $commitishPath,
+ 'nextPage' => null,
+ 'start' => null,
+ 'commits' => $jsonFormattedCommits
+ ), 200
+ );
+ }
return $app->json( array(
'repo' => $repo,
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -351,7 +351,7 @@
}
function handleNoAvailableData() {
- console.log('No Data available');
+ window.console && console.log('No (more) Data available');
}
var awaitedParents = {};

0 comments on commit 5fd33a9

Please sign in to comment.