Skip to content

Commit

Permalink
Update typing of collaborator
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Oct 24, 2024
1 parent b64b54b commit a70e009
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/collaboration/src/collaboratorspanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@ export class CollaboratorsPanel extends Panel {
const state = this._awareness.getStates() as any;
const collaborators: ICollaboratorAwareness[] = [];

state.forEach((value: ICollaboratorAwareness, key: any) => {
state.forEach((value: Partial<ICollaboratorAwareness>, key: any) => {
if (
this._currentUser.isReady &&
value.user &&
value.user.username !== this._currentUser.identity!.username

Check warning on line 106 in packages/collaboration/src/collaboratorspanel.tsx

View workflow job for this annotation

GitHub Actions / Run pre-commit hook

Forbidden non-null assertion
) {
collaborators.push(value);
collaborators.push(value as ICollaboratorAwareness);
}
});
this._collaboratorsChanged.emit(collaborators);
Expand Down

0 comments on commit a70e009

Please sign in to comment.