mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
fix(email-composer): fix error when no mail apps (#3347)
When there are no apps installed that can handle "mail" then the "apps" array is returned as `null` from the plugin. Ensure we don't try to call `length` on `null`.
This commit is contained in:
parent
52fc9f85ad
commit
7bcbca7696
@ -198,7 +198,7 @@ export class EmailComposer extends IonicNativePlugin {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
EmailComposer.getPlugin().getClients((apps: string[]) => {
|
EmailComposer.getPlugin().getClients((apps: string[]) => {
|
||||||
resolve(apps.length && apps.length > 0);
|
resolve(apps && apps.length > 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user