Преглед изворни кода

chore(telemetry-dashboard): simplify the chart-library probe in the shell

Refs CG-11.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Colby McHenry пре 1 месец
родитељ
комит
d61bd62022
1 измењених фајлова са 2 додато и 7 уклоњено
  1. 2 7
      telemetry-dashboard/public/app.js

+ 2 - 7
telemetry-dashboard/public/app.js

@@ -22,13 +22,8 @@ function set(id, text, bad = false) {
   el.classList.toggle('bad', bad);
 }
 
-set(
-  'chart-status',
-  typeof window.Chart === 'string' || window.Chart === undefined
-    ? 'Not loaded'
-    : `Chart.js ${window.Chart.version}`,
-  window.Chart === undefined,
-);
+const chart = window.Chart;
+set('chart-status', chart ? `Chart.js ${chart.version}` : 'Not loaded', !chart);
 
 try {
   const health = await api('/api/health');