Commit 0a1f519c authored by Alfredo Sumaran's avatar Alfredo Sumaran

Take only objects for the events list

parent c52f3d1c
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment