Skip to content

Commit

Permalink
Use isVersionSupported() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
hughns committed Apr 13, 2022
1 parent 7b6c710 commit 5e5fe0a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/client.ts
Expand Up @@ -6598,8 +6598,7 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
* @return {Promise<boolean>} true if server supports the `logout_devices` parameter
*/
public async doesServerSupportLogoutDevices(): Promise<boolean> {

This comment has been minimized.

Copy link
@t3chguy

t3chguy Apr 13, 2022

Member

micro-optimisation but async here is now redundant yet adds a tick

const response = await this.getVersions();
return response?.versions?.includes("r0.6.1");
return this.isVersionSupported("r0.6.1");
}

/**
Expand Down

0 comments on commit 5e5fe0a

Please sign in to comment.