Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getElementMap have been removed from @excalidraw/excalidraw-next? how to update CollabWrapper line 21? #11

Open
ruifeng96150 opened this issue Nov 30, 2021 · 1 comment

Comments

@ruifeng96150
Copy link

getElementMap have been removed from @excalidraw/excalidraw-next? how to update CollabWrapper line 21?

@ad1992
Copy link
Member

ad1992 commented Nov 30, 2021

I think you meant to create the issue in @excalidraw/excalidraw repo ? As per the removal of getElementMap, If you are using getElementMap in your code, you can copy the function in your code

const getElementMap = (elements: readonly ExcalidrawElement[]) =>
  elements.reduce(
    (acc: { [key: string]: ExcalidrawElement }, element: ExcalidrawElement) => {
      acc[element.id] = element;
      return acc;
    },
    {},
  );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants