From 529eba9676b00908869a1c9469a09bb18ef6a553 Mon Sep 17 00:00:00 2001 From: dwelle Date: Sat, 31 Dec 2022 22:37:10 +0100 Subject: [PATCH] unrelated type tweak --- src/excalidraw-app/collab/Portal.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/excalidraw-app/collab/Portal.tsx b/src/excalidraw-app/collab/Portal.tsx index 55e1abff0..eaff5fd65 100644 --- a/src/excalidraw-app/collab/Portal.tsx +++ b/src/excalidraw-app/collab/Portal.tsx @@ -143,7 +143,12 @@ class Portal { // periodically we'll resync the whole thing to make sure no one diverges // due to a dropped message (server goes down etc). const syncableElements = allElements.reduce( - (acc, element: BroadcastedExcalidrawElement, idx, elements) => { + ( + acc: BroadcastedExcalidrawElement[], + element: BroadcastedExcalidrawElement, + idx, + elements, + ) => { if ( (syncAll || !this.broadcastedElementVersions.has(element.id) || @@ -159,7 +164,7 @@ class Portal { } return acc; }, - [] as BroadcastedExcalidrawElement[], + [], ); const data: SocketUpdateDataSource[typeof updateType] = {