Skip to content

Commit

Permalink
fix collab MOUSE_LOCATION payload naming for legacy versions (excalid…
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelle authored Aug 29, 2020
1 parent 1828a93 commit 0e28177
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1298,12 +1298,17 @@ class App extends React.Component<ExcalidrawProps, AppState> {
break;
case "MOUSE_LOCATION": {
const {
socketId,
pointer,
button,
username,
selectedElementIds,
} = decryptedData.payload;

const socketId: SocketUpdateDataSource["MOUSE_LOCATION"]["payload"]["socketId"] =
decryptedData.payload.socketId ||
// @ts-ignore legacy, see #2094 (#2097)
decryptedData.payload.socketID;

// NOTE purposefully mutating collaborators map in case of
// pointer updates so as not to trigger LayerUI rerender
this.setState((state) => {
Expand Down

0 comments on commit 0e28177

Please sign in to comment.