Skip to content

Commit

Permalink
fix(angular): correct subscription to cordova ready event (#14577)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrm authored and manucorporat committed Jun 5, 2018
1 parent aaf3eee commit 5967352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion angular/src/providers/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5967352

Please sign in to comment.