fix(rn) await for the promise in the _init object

This commit is contained in:
tmoldovan8x8 2022-01-11 17:03:42 +02:00 committed by GitHub
parent 1d3d6a32a6
commit 26a6c336e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View File

@ -31,7 +31,10 @@ export type Props = {
* @abstract
*/
export class AbstractApp extends BaseApp<Props, *> {
_init: Promise<*>;
/**
* The deferred for the initialisation {{promise, resolve, reject}}.
*/
_init: Object;
/**
* Initializes the app.
@ -57,7 +60,7 @@ export class AbstractApp extends BaseApp<Props, *> {
const previousTimestamp = prevProps.timestamp;
const currentTimestamp = this.props.timestamp;
await this._init;
await this._init.promise;
// Deal with URL changes.

View File

@ -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.

View File

@ -29,7 +29,10 @@ type Props = {
* @augments BaseApp
*/
export default class PrejoinApp extends BaseApp<Props> {
_init: Promise<*>;
/**
* The deferred for the initialisation {{promise, resolve, reject}}.
*/
_init: Object;
/**
* Navigates to {@link Prejoin} upon mount.