summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/graphs/stat_graph_contributors.js
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-11-27 15:28:24 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-12-18 16:13:35 -0600
commit2d4d1290f0ab7baad94af93904c1a3c81fddfe37 (patch)
tree8c922f5a95af02d454baf7f16e7311abc942885a /app/assets/javascripts/graphs/stat_graph_contributors.js
parentbe60cca90d510061a91a7be36df4c0fb6469587a (diff)
downloadgitlab-ce-2d4d1290f0ab7baad94af93904c1a3c81fddfe37.tar.gz
corrected functionality from the stat_contributors_graph
Diffstat (limited to 'app/assets/javascripts/graphs/stat_graph_contributors.js')
-rw-r--r--app/assets/javascripts/graphs/stat_graph_contributors.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/app/assets/javascripts/graphs/stat_graph_contributors.js b/app/assets/javascripts/graphs/stat_graph_contributors.js
index 743c049e9fb..151a4ce012c 100644
--- a/app/assets/javascripts/graphs/stat_graph_contributors.js
+++ b/app/assets/javascripts/graphs/stat_graph_contributors.js
@@ -84,9 +84,12 @@ export default (function() {
return _.each(author_commits, (function(_this) {
return function(d) {
_this.redraw_author_commit_info(d);
- $(_this.authors[d.author_name].list_item).appendTo("ol");
- _this.authors[d.author_name].set_data(d.dates);
- return _this.authors[d.author_name].redraw();
+ if (_this.authors[d.author_name] != null) {
+ $(_this.authors[d.author_name].list_item).appendTo("ol");
+ _this.authors[d.author_name].set_data(d.dates);
+ return _this.authors[d.author_name].redraw();
+ }
+ return '';
};
})(this));
};
@@ -108,10 +111,14 @@ export default (function() {
};
ContributorsStatGraph.prototype.redraw_author_commit_info = function(author) {
- var author_commit_info, author_list_item;
- author_list_item = $(this.authors[author.author_name].list_item);
- author_commit_info = this.format_author_commit_info(author);
- return author_list_item.find("span").html(author_commit_info);
+ var author_commit_info, author_list_item, $author;
+ $author = this.authors[author.author_name];
+ if ($author != null) {
+ author_list_item = $(this.authors[author.author_name].list_item);
+ author_commit_info = this.format_author_commit_info(author);
+ return author_list_item.find("span").html(author_commit_info);
+ }
+ return '';
};
return ContributorsStatGraph;