瀏覽代碼

unrelated type tweak

dwelle 2 年之前
父節點
當前提交
529eba9676
共有 1 個文件被更改,包括 7 次插入2 次删除
  1. 7 2
      src/excalidraw-app/collab/Portal.tsx

+ 7 - 2
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] = {