Skip to content

Commit

Permalink
Fix Dashboard UI blowing up at the very beginning (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
mieciu authored May 22, 2024
1 parent d56195d commit cec5d48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions quesma/quesma/mux/match_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,16 @@ func (s Statistics) GroupByFirstSegment() (sortedMatchedKeys []string, matched m

for _, url := range s.Matched {
segments := strings.Split(url, "/")
matched["/"+segments[1]] = append(matched["/"+segments[1]], url)
if len(segments) > 1 {
matched["/"+segments[1]] = append(matched["/"+segments[1]], url)
}
}

for _, url := range s.Unmatched {
segments := strings.Split(url, "/")
unmatched["/"+segments[1]] = append(unmatched["/"+segments[1]], url)
if len(segments) > 1 {
unmatched["/"+segments[1]] = append(unmatched["/"+segments[1]], url)
}
}

for _, paths := range matched {
Expand Down

0 comments on commit cec5d48

Please sign in to comment.