diff options
author | gfyoung <gfyoung17@gmail.com> | 2018-06-13 23:18:05 -0700 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2018-06-15 13:08:47 -0700 |
commit | dbc74800e22c9ea417d30fd4c357d6154cc71870 (patch) | |
tree | f704225b4ce0d922047b5eb83a258ca2e69e3a7a /app/assets/javascripts/pages | |
parent | 102db0aaf162ec122d79e1aaff0f5ac3c86af373 (diff) | |
download | gitlab-ce-dbc74800e22c9ea417d30fd4c357d6154cc71870.tar.gz |
Enable no-multi-assignment in JS files
Partially addresses #47006.
Diffstat (limited to 'app/assets/javascripts/pages')
-rw-r--r-- | app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors_util.js | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors.js b/app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors.js index 653e2502d01..37336a8cb69 100644 --- a/app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors.js +++ b/app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors.js @@ -36,7 +36,9 @@ export default (function() { var author_graph, author_header; author_header = _this.create_author_header(d); $(".contributors-list").append(author_header); - _this.authors[d.author_name] = author_graph = new ContributorsAuthorGraph(d.dates); + + author_graph = new ContributorsAuthorGraph(d.dates); + _this.authors[d.author_name] = author_graph; return author_graph.draw(); }; })(this)); diff --git a/app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors_util.js b/app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors_util.js index 77135ad1f0e..165446a4db6 100644 --- a/app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors_util.js +++ b/app/assets/javascripts/pages/projects/graphs/show/stat_graph_contributors_util.js @@ -111,10 +111,15 @@ export default { parse_log_entry: function(log_entry, field, date_range) { var parsed_entry; parsed_entry = {}; + parsed_entry.author_name = log_entry.author_name; parsed_entry.author_email = log_entry.author_email; parsed_entry.dates = {}; - parsed_entry.commits = parsed_entry.additions = parsed_entry.deletions = 0; + + parsed_entry.commits = 0; + parsed_entry.additions = 0; + parsed_entry.deletions = 0; + _.each(_.omit(log_entry, 'author_name', 'author_email'), (function(_this) { return function(value, key) { if (_this.in_range(value.date, date_range)) { |