Skip to content

Commit

Permalink
avoid accessing .auth (therefore localStorage) if Auth is not being u…
Browse files Browse the repository at this point in the history
…sed.
  • Loading branch information
endel committed Apr 8, 2021
1 parent b2dd971 commit a135a6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export class Client {
const url = `${this.endpoint.replace("ws", "http")}/matchmake/${method}/${roomName}`;

// automatically forward auth token, if present
if (this.auth.hasToken) {
options.token = this.auth.token;
if (this._auth && this._auth.hasToken) {
options.token = this._auth.token;
}

const response = (
Expand Down

0 comments on commit a135a6e

Please sign in to comment.