Skip to content

Commit

Permalink
Add the "isHost" dataContext helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderson1993 committed Apr 20, 2022
1 parent 6913d38 commit f99b9d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/src/utils/DataContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export class DataContext {
get flightClient() {
return this.findFlightClient(this.clientId);
}
get isHost() {
return this.client.isHost;
}
findFlightClient(clientId: string) {
if (!this.database.flight) return null;
if (!this.database.flight.clients[clientId]) {
Expand Down

0 comments on commit f99b9d4

Please sign in to comment.