From 26a6c336e329384bc9f835463aa0b893d93056bf Mon Sep 17 00:00:00 2001 From: tmoldovan8x8 <62697631+tmoldovan8x8@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:03:42 +0200 Subject: [PATCH] fix(rn) await for the promise in the _init object --- react/features/app/components/AbstractApp.js | 7 +++++-- react/features/app/components/App.native.js | 5 ++++- react/features/prejoin/components/PrejoinApp.js | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/react/features/app/components/AbstractApp.js b/react/features/app/components/AbstractApp.js index b7d39f30c0..c179fa94d8 100644 --- a/react/features/app/components/AbstractApp.js +++ b/react/features/app/components/AbstractApp.js @@ -31,7 +31,10 @@ export type Props = { * @abstract */ export class AbstractApp extends BaseApp { - _init: Promise<*>; + /** + * The deferred for the initialisation {{promise, resolve, reject}}. + */ + _init: Object; /** * Initializes the app. @@ -57,7 +60,7 @@ export class AbstractApp extends BaseApp { const previousTimestamp = prevProps.timestamp; const currentTimestamp = this.props.timestamp; - await this._init; + await this._init.promise; // Deal with URL changes. diff --git a/react/features/app/components/App.native.js b/react/features/app/components/App.native.js index f569e65631..72773c2147 100644 --- a/react/features/app/components/App.native.js +++ b/react/features/app/components/App.native.js @@ -53,7 +53,10 @@ type Props = AbstractAppProps & { * @augments AbstractApp */ export class App extends AbstractApp { - _init: Promise<*>; + /** + * The deferred for the initialisation {{promise, resolve, reject}}. + */ + _init: Object; /** * Initializes a new {@code App} instance. diff --git a/react/features/prejoin/components/PrejoinApp.js b/react/features/prejoin/components/PrejoinApp.js index 612992e963..58338f516f 100644 --- a/react/features/prejoin/components/PrejoinApp.js +++ b/react/features/prejoin/components/PrejoinApp.js @@ -29,7 +29,10 @@ type Props = { * @augments BaseApp */ export default class PrejoinApp extends BaseApp { - _init: Promise<*>; + /** + * The deferred for the initialisation {{promise, resolve, reject}}. + */ + _init: Object; /** * Navigates to {@link Prejoin} upon mount.