From 98f17223748a7941b06fc0a2186491efa616b83e Mon Sep 17 00:00:00 2001 From: Nakamura Shotaro Date: Fri, 2 Feb 2024 18:27:58 +0900 Subject: [PATCH] fix: `p1` is undefined --- .../components/notes/ImageNote/components/EditorCoreX.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/islands/note-x/components/notes/ImageNote/components/EditorCoreX.tsx b/src/islands/note-x/components/notes/ImageNote/components/EditorCoreX.tsx index a6dc49cc..87a5b392 100644 --- a/src/islands/note-x/components/notes/ImageNote/components/EditorCoreX.tsx +++ b/src/islands/note-x/components/notes/ImageNote/components/EditorCoreX.tsx @@ -172,7 +172,7 @@ export default (props: Props) => { }) scaleDatas.end() } - } else { + } else if (Object.values(pointersData).filter((e) => e?.isDowned).length >= 2) { // タッチしているポインターが2つ以上 const downedPointers = Object.values(pointersData).filter((e) => e?.isDowned) const p0 = downedPointers[0]!