mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-31 10:36:14 +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 {
|
||||
EmailComposer.getPlugin().getClients((apps: string[]) => {
|
||||
resolve(apps.length && apps.length > 0);
|
||||
resolve(apps && apps.length > 0);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user