Skip to content

Commit

Permalink
fix(plugin): don't call reject when sync
Browse files Browse the repository at this point in the history
  • Loading branch information
tlancina committed Mar 6, 2016
1 parent 3f5db6d commit 1334f60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1334f60

Please sign in to comment.