mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-07 10:55:31 +01:00
error prop may not always exist
This commit is contained in:
parent
5521862498
commit
7b173fe8eb
@ -99,7 +99,7 @@ export class SessionViewModel extends ViewModel {
|
|||||||
this._client.sync.status.subscribe(status => {
|
this._client.sync.status.subscribe(status => {
|
||||||
if (status === SyncStatus.Stopped) {
|
if (status === SyncStatus.Stopped) {
|
||||||
const error = this._client.sync.error;
|
const error = this._client.sync.error;
|
||||||
if (error.errcode === "M_UNKNOWN_TOKEN") {
|
if (error?.errcode === "M_UNKNOWN_TOKEN") {
|
||||||
// Access token is no longer valid, so force the user to log out
|
// Access token is no longer valid, so force the user to log out
|
||||||
const segments = [
|
const segments = [
|
||||||
this.navigation.segment("logout", this.id),
|
this.navigation.segment("logout", this.id),
|
||||||
|
Loading…
Reference in New Issue
Block a user