mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +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).
|
||||
if(!window.cordova) {
|
||||
cordovaWarn(pluginObj.name, methodName);
|
||||
reject({
|
||||
reject && reject({
|
||||
error: 'cordova_not_available'
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
pluginWarn(pluginObj, methodName);
|
||||
reject({
|
||||
reject && reject({
|
||||
error: 'plugin_not_installed'
|
||||
});
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user