diff --git a/app/views/RoomView/index.tsx b/app/views/RoomView/index.tsx index c0b561b45..b19de0feb 100644 --- a/app/views/RoomView/index.tsx +++ b/app/views/RoomView/index.tsx @@ -181,9 +181,9 @@ class RoomView extends React.Component { private willBlurListener?: { remove(): void }; private subSubscription?: { unsubscribe(): void }; private queryUnreads?: { unsubscribe(): void }; - private retryInit: any; + private retryInit?: number; private retryInitTimeout?: ReturnType; - private retryFindCount: any; + private retryFindCount?: number; private retryFindTimeout?: ReturnType; private messageErrorActions: any; private messageActions: any; @@ -563,7 +563,7 @@ class RoomView extends React.Component { this.setState({ canAutoTranslate, member, loading: false }); } catch (e) { this.setState({ loading: false }); - this.retryInit = this.retryInit + 1 || 1; + this.retryInit = this.retryInit! + 1 || 1; if (this.retryInit <= 1) { this.retryInitTimeout = setTimeout(() => { this.init(); @@ -611,7 +611,7 @@ class RoomView extends React.Component { if (this.rid) { // We navigate to RoomView before the Room is inserted to the local db // So we retry just to make sure we have the right content - this.retryFindCount = this.retryFindCount + 1 || 1; + this.retryFindCount = this.retryFindCount! + 1 || 1; if (this.retryFindCount <= 3) { this.retryFindTimeout = setTimeout(() => { this.findAndObserveRoom(rid);