mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-22 09:24:22 +02:00
chore(frontend): fix type errors
This commit is contained in:
@@ -56,10 +56,12 @@ const emit = defineEmits<{
|
||||
}>();
|
||||
|
||||
function getScreenY(event: TouchEvent | MouseEvent | PointerEvent): number {
|
||||
if (event.touches && event.touches[0] && event.touches[0].screenY != null) {
|
||||
if (('touches' in event) && event.touches[0] && event.touches[0].screenY != null) {
|
||||
return event.touches[0].screenY;
|
||||
} else {
|
||||
} else if ('screenY' in event) {
|
||||
return event.screenY;
|
||||
} else {
|
||||
return 0; // TSを黙らせるため
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user