acrashing

This commit is contained in:
legop3
2026-05-18 00:03:26 -04:00
parent 372c5dee70
commit 8a7be00bf6
3 changed files with 7 additions and 5 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -11,7 +11,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Roomba Rover" />
<title>Roomba Rover</title>
<script type="module" crossorigin src="/assets/index-CLAEEGOj.js"></script>
<script type="module" crossorigin src="/assets/index-ZJG0zdLU.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-LJWnKvT4.css">
</head>
<body>
+5 -3
View File
@@ -107,9 +107,11 @@ export default function HornControl({
const handleWheel = (event) => {
const target = event.target;
if (!(target instanceof HTMLInputElement)) return;
const index = Number(target.dataset.hornFreqIndex);
if (!Number.isInteger(index)) return;
if (!(target instanceof Element)) return;
const input = target.closest('input[data-horn-freq-index]');
if (!input) return;
const index = Number(input.dataset.hornFreqIndex);
if (!Number.isInteger(index) || index < 0 || index >= freqs.length) return;
event.preventDefault();
event.stopPropagation();
const direction = event.deltaY < 0 ? 1 : -1;