Fix sorting on Chromium-based browsers (#107)

This commit is contained in:
Edward Moulsdale
2025-02-06 14:20:13 +00:00
committed by GitHub
parent 314f67fa45
commit 1874eaef7a
2 changed files with 1 additions and 4 deletions

View File

@@ -15,9 +15,6 @@
<div style="display: flex; align-items: center; margin-bottom: 1em;">
<div style="flex-grow: 3;">
Normalized (percentage of the average time). <strong>Lower is better on all graphs.</strong>
<p>
<strong>⚠️ There are <a href="https://github.com/godotengine/godot-benchmarks/issues/87">known issues</a> with graph sorting in Chromium-based browsers. Please use Firefox for now. ⚠️</strong>
</p>
</div>
</div>
<div style="display: grid; grid-template-columns: 50% 50%; gap: 1em;">

View File

@@ -17,7 +17,7 @@ function displayGraph(targetDivID, graphID, type = "full", filter = "") {
// Include benchmark data JSON to generate graphs.
const allBenchmarks = Database.benchmarks.sort(
(a, b) => `${a.date}.${a.commit}` > `${b.date}.${b.commit}`,
(a, b) => `${a.date}.${a.commit}` > `${b.date}.${b.commit}` ? 1 : -1,
);
const graph = Database.graphs.find((g) => g.id == graphID);
if (!graph) {