mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Show report statistics for single reports as well
This commit is contained in:
parent
7e531ec6fe
commit
e6c479e956
1 changed files with 4 additions and 4 deletions
|
|
@ -283,15 +283,15 @@ function compare_reports()
|
|||
const section = document.getElementById("comparison");
|
||||
section.innerHTML = "<h3>Report Comparison</h3>";
|
||||
|
||||
if (g_reports.length < 2)
|
||||
if (g_active_elements.length < 1)
|
||||
{
|
||||
section.innerHTML += "<p>Too few reports loaded</p>";
|
||||
section.innerHTML += "<p>Select an element to show statistics</p>";
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_active_elements.length != 1)
|
||||
if (g_active_elements.length > 1)
|
||||
{
|
||||
section.innerHTML += "<p>Too many of too few elements selected</p>";
|
||||
section.innerHTML += "<p>Too many elements selected</p>";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue