Skip to content

Commit

Permalink
Merge branch 'fix/wait-for-platform' into 'master'
Browse files Browse the repository at this point in the history
fix(cordova): wait for platform to be ready before initializing push and getting app version

See merge request papers/airgap/airgap-wallet!119
  • Loading branch information
AndreasGassmann committed Apr 16, 2019
2 parents 74d86c9 + b082c05 commit 19ea80f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/providers/app-info/app-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class AppInfoProvider {

async updateVersions() {
if (this.platform.is('cordova')) {
await this.platform.ready()
this.appName = await this.app.getAppName()
this.packageName = await this.app.getPackageName()
this.versionNumber = await this.app.getVersionNumber()
Expand Down
2 changes: 2 additions & 0 deletions src/providers/push/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export class PushProvider {
}

public async initPush(): Promise<void> {
await this.platform.ready()

if (!this.platform.is('cordova')) {
return
}
Expand Down

0 comments on commit 19ea80f

Please sign in to comment.