Skip to content

Commit

Permalink
fix: fix data empty issue for git
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 22, 2021
1 parent ef6cb58 commit b2659c9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions web/public/js/graph/git/file-explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,18 @@ function renderCodeExplorer(data, elementId) {
let currentValue = 0;


let min_time = d3.min(allNodes, d => d.data.data.git.creation_date) * 1000;
let max_time = d3.max(allNodes, d => d.data.data.git.last_update) * 1000;
let min_time = d3.min(allNodes, d => {
if (d.data.data.git) {
return d.data.data.git.creation_date;
}
return null;
}) * 1000;
let max_time = d3.max(allNodes, d => {
if (d.data.data.git) {
return d.data.data.git.last_update;
}
return null;
}) * 1000;
let startDate = min_time;

let targetValue = width;
Expand Down

0 comments on commit b2659c9

Please sign in to comment.