fix(plugin): don't call reject when sync

This commit is contained in:
Tim Lancina 2016-03-06 08:34:05 -06:00
parent 3f5db6d6fe
commit 1334f60b68

View File

@ -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;