低版本permissions插件兼容
This commit is contained in:
parent
615459efb4
commit
e45249f383
|
@ -68,7 +68,7 @@ export async function cordovaReady() {
|
||||||
})).then(shouldRequestPermissions => {
|
})).then(shouldRequestPermissions => {
|
||||||
return shouldRequestPermissions
|
return shouldRequestPermissions
|
||||||
.filter(({ hasPermission }) => !hasPermission)
|
.filter(({ hasPermission }) => !hasPermission)
|
||||||
.map(({ request }) => permissions[request]);
|
.map(({ request }) => permissions[request] || `android.permission.${request}`);
|
||||||
}).then(willRequestPermissions => {
|
}).then(willRequestPermissions => {
|
||||||
permissions.requestPermissions(
|
permissions.requestPermissions(
|
||||||
willRequestPermissions,
|
willRequestPermissions,
|
||||||
|
|
Loading…
Reference in New Issue