fix malformed JSON on days without commits in the combined view

Sun, 10 Aug 2025 11:59:03 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 10 Aug 2025 11:59:03 +0200
changeset 60
9b1cbc665851
parent 59
881ab7ae15a6
child 61
d77763d2fdda

fix malformed JSON on days without commits in the combined view

src/html.cpp file | annotate | diff | comparison | revisions
--- a/src/html.cpp	Sun Aug 10 11:57:05 2025 +0200
+++ b/src/html.cpp	Sun Aug 10 11:59:03 2025 +0200
@@ -404,7 +404,9 @@
             add_summaries(summaries_json, summaries);
             summaries_json += "],";
         }
-        summaries_json.pop_back();
+        if (!commits.summaries.empty()) {
+            summaries_json.pop_back();
+        }
         summaries_json += '}';
     }
 

mercurial