Skip to content

Commit 280d4f9

Browse files
Potential fixes for 2 code quality findings (#114)
* Apply suggested fix to docs/benchmarks/latest/charts.html from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> * Apply suggested fix to docs/benchmarks/latest/charts.html from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
1 parent 8493e9d commit 280d4f9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/benchmarks/latest/charts.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Cachekit Benchmark Charts</title>
7-
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
7+
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"
8+
integrity="sha384-REPLACE_WITH_OFFICIAL_CHARTJS_4_4_1_UMD_MIN_SHA384"
9+
crossorigin="anonymous"></script>
810
<style>
911
* {
1012
margin: 0;
@@ -461,6 +463,11 @@ <h2>Adaptation Speed (Ops to 80%)</h2>
461463
scores.push(result.metrics.scan_resistance.resistance_score);
462464
}
463465
});
466+
467+
if (!results || results.length === 0 || scores.length === 0) {
468+
return;
469+
}
470+
464471
const scanResistanceMax = Math.max(1.0, ...scores) * 1.05;
465472

466473
new Chart(document.getElementById('scanResistanceChart'), {

0 commit comments

Comments
 (0)