MOBILE-3592 core: Fix cordova_not_available error

main
Dani Palou 2020-12-11 15:25:25 +01:00
parent 0819947072
commit 1d77811be2
1 changed files with 4 additions and 0 deletions

View File

@ -87,6 +87,10 @@ export class CoreLocalNotificationsProvider {
protected async init(): Promise<void> {
await Platform.instance.ready();
if (!this.isAvailable()) {
return;
}
// Listen to events.
this.triggerSubscription = LocalNotifications.instance.on('trigger').subscribe((notification: ILocalNotification) => {
this.trigger(notification);