- We detected a {recommendedPreset.label.replace(/\s/g, "")} video → Recommended: {recommendedPreset.platform.split("·")[0].trim()} ({recommendedPreset.label.replace(/\s/g, "")})
+ We detected a {recommendedPreset.label.replace(/\s/g, "")} video → Recommended: {(recommendedPreset.platform.split("·")[0] ?? "").trim()} ({recommendedPreset.label.replace(/\s/g, "")})
)}
diff --git a/src/components/WaveformCanvas.tsx b/src/components/WaveformCanvas.tsx
index a170a0e7..cff6a6bc 100644
--- a/src/components/WaveformCanvas.tsx
+++ b/src/components/WaveformCanvas.tsx
@@ -54,7 +54,7 @@ export default function WaveformCanvas({ samples, loading, hasAudio }: Props) {
ctx.globalAlpha = 0.7;
for (let i = 0; i < samples.length; i++) {
- const amplitude = samples[i];
+ const amplitude = samples[i] ?? 0;
const barHeight = Math.max(amplitude * (height * 0.92), 1.5);
const x = i * barWidth;
const y = midY - barHeight / 2;
diff --git a/tsconfig.json b/tsconfig.json
index 5310d2e1..5fe25c1c 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -5,6 +5,7 @@
"allowJs": true,
"skipLibCheck": true,
"strict": true,
+ "noUncheckedIndexedAccess": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",