mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-11-20 03:25:52 +01:00
Throw if session hasn't been loaded
This commit is contained in:
parent
44f20d54b0
commit
e5b87a8518
@ -343,6 +343,9 @@ export class Client {
|
||||
* @param {string} token A Matrix Access Token
|
||||
*/
|
||||
async updateAccessToken(token) {
|
||||
if (!_this.session) {
|
||||
throw Error("No session loaded, cannot update access token");
|
||||
}
|
||||
this._session.updateAccessToken(token);
|
||||
await this._platform.sessionInfoStorage.updateAccessToken(this._sessionId, token);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user