mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
fix(plugin): don't call reject when sync
This commit is contained in:
parent
3f5db6d6fe
commit
1334f60b68
@ -59,14 +59,14 @@ function callCordovaPlugin(pluginObj:any, methodName:string, args:any[], opts:an
|
|||||||
// Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation).
|
// Do this check in here in the case that the Web API for this plugin is available (for example, Geolocation).
|
||||||
if(!window.cordova) {
|
if(!window.cordova) {
|
||||||
cordovaWarn(pluginObj.name, methodName);
|
cordovaWarn(pluginObj.name, methodName);
|
||||||
reject({
|
reject && reject({
|
||||||
error: 'cordova_not_available'
|
error: 'cordova_not_available'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginWarn(pluginObj, methodName);
|
pluginWarn(pluginObj, methodName);
|
||||||
reject({
|
reject && reject({
|
||||||
error: 'plugin_not_installed'
|
error: 'plugin_not_installed'
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user