mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 18:17:31 +08:00
fix(angular): correct subscription to cordova ready event (#14577)
This commit is contained in:

committed by
Manu MA

parent
aaf3eee59d
commit
5967352a32
@ -45,7 +45,7 @@ export class Platform {
|
||||
let readyResolve: (value: string) => void;
|
||||
this._readyPromise = new Promise(res => { readyResolve = res; } );
|
||||
if ((window as any)['cordova']) {
|
||||
window.addEventListener('deviceready', () => {
|
||||
document.addEventListener('deviceready', () => {
|
||||
readyResolve('cordova');
|
||||
}, {once: true});
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user