MOBILE-3592 core: Fix cordova_not_available error
parent
0819947072
commit
1d77811be2
|
@ -87,6 +87,10 @@ export class CoreLocalNotificationsProvider {
|
||||||
protected async init(): Promise<void> {
|
protected async init(): Promise<void> {
|
||||||
await Platform.instance.ready();
|
await Platform.instance.ready();
|
||||||
|
|
||||||
|
if (!this.isAvailable()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Listen to events.
|
// Listen to events.
|
||||||
this.triggerSubscription = LocalNotifications.instance.on('trigger').subscribe((notification: ILocalNotification) => {
|
this.triggerSubscription = LocalNotifications.instance.on('trigger').subscribe((notification: ILocalNotification) => {
|
||||||
this.trigger(notification);
|
this.trigger(notification);
|
||||||
|
|
Loading…
Reference in New Issue