summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-11-22 20:04:57 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-11-23 12:27:40 -0500
commit0a1f519c2af4bd5f67e1a74701d98583047da117 (patch)
tree480330a89298e732eda120d5e491a9bc4d17888e
parentc52f3d1ca0fede064e6b886af0297d1ae8f9f18b (diff)
downloadgitlab-ce-24836-tyeerror-e-is-null-when-clicking-plan-tab-in-cycle-analytics.tar.gz
-rw-r--r--app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es68
1 files changed, 6 insertions, 2 deletions
diff --git a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6 b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
index 9b905874167..be732971c7f 100644
--- a/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
+++ b/app/assets/javascripts/cycle_analytics/cycle_analytics_store.js.es6
@@ -62,9 +62,11 @@
this.state.events = this.decorateEvents(events);
},
decorateEvents(events) {
- const newEvents = events;
+ const newEvents = [];
+
+ events.forEach((item) => {
+ if (!item) return;
- newEvents.forEach((item) => {
item.totalTime = item.total_time;
item.author.webUrl = item.author.web_url;
item.author.avatarUrl = item.author.avatar_url;
@@ -79,6 +81,8 @@
delete item.created_at;
delete item.short_sha;
delete item.commit_url;
+
+ newEvents.push(item);
});
return newEvents;