Skip to content

Commit afc2986

Browse files
martinRenouandrii-i
authored andcommitted
Update typing of collaborator (jupyterlab#383)
1 parent 16eb243 commit afc2986

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/collaboration/src/collaboratorspanel.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,13 @@ export class CollaboratorsPanel extends Panel {
9999
const state = this._awareness.getStates() as any;
100100
const collaborators: ICollaboratorAwareness[] = [];
101101

102-
state.forEach((value: ICollaboratorAwareness, key: any) => {
102+
state.forEach((value: Partial<ICollaboratorAwareness>, key: any) => {
103103
if (
104104
this._currentUser.isReady &&
105+
value.user &&
105106
value.user.username !== this._currentUser.identity!.username
106107
) {
107-
collaborators.push(value);
108+
collaborators.push(value as ICollaboratorAwareness);
108109
}
109110
});
110111
this._collaboratorsChanged.emit(collaborators);

0 commit comments

Comments
 (0)