Skip to content

Commit 9e6e7da

Browse files
committed
Verify that user.id is valid before connecting the events gateway.
1 parent 7f74636 commit 9e6e7da

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/core/services/events-gateway.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ export class EventsGateway {
6868

6969
public init(): void {
7070
// When we have a logged-in user then connect to the event gateway
71-
this._store.select(selectLoggedInUser).pipe(filter(user => !!user)).subscribe(_ => {
71+
this._store.select(selectLoggedInUser).pipe(
72+
filter(user => !!user),
73+
filter(user => user.id !== '0')
74+
).subscribe(_ => {
7275
this.connect();
7376
});
7477
}

0 commit comments

Comments
 (0)