Improve type safety check for event button in ViewportCanvas

This commit is contained in:
2026-04-27 19:24:07 +02:00
parent a27381ee26
commit 0782fe06ad

View File

@@ -154,7 +154,7 @@ function ViewportTimeTransport({
const startStepping = useCallback(
(direction: -1 | 1, event: ReactPointerEvent<HTMLButtonElement>) => {
if (event.button !== 0) {
if (typeof event.button === "number" && event.button !== 0) {
return;
}