Skip to content

Commit 7a77805

Browse files
committed
adds empty time value validation
also frontend won't crash due trying to use empty time values
1 parent 95d7b47 commit 7a77805

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

traceapp/vis.go

+5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ func (a *App) d3timelineInner(t *appdash.Trace, depth int) ([]timelineItem, erro
9292
}
9393
for _, e := range events {
9494
if e, ok := e.(appdash.TimespanEvent); ok {
95+
// Continue to next iteration
96+
// if e.Start() or e.End() are empty time values.
97+
if e.Start() == (time.Time{}) || e.End() == (time.Time{}) {
98+
continue
99+
}
95100
start := e.Start().UnixNano() / int64(time.Millisecond)
96101
end := e.End().UnixNano() / int64(time.Millisecond)
97102
ts := timelineItemTimespan{

0 commit comments

Comments
 (0)