mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
Reject on no plugin
This commit is contained in:
Vendored
+3
@@ -1089,6 +1089,9 @@ var promisifyCordova = function promisifyCordova(pluginObj, pluginName, methodNa
|
|||||||
|
|
||||||
if (!pluginObj.installed()) {
|
if (!pluginObj.installed()) {
|
||||||
console.warn('Cordova: tried calling', '"' + pluginName + '.' + methodName + '"', 'but the ' + pluginObj.plugin + ' plugin is not installed.');
|
console.warn('Cordova: tried calling', '"' + pluginName + '.' + methodName + '"', 'but the ' + pluginObj.plugin + ' plugin is not installed.');
|
||||||
|
reject({
|
||||||
|
error: 'plugin_not_installed'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('Cordova: exec(' + pluginName + ', ' + methodName + ')');
|
console.log('Cordova: exec(' + pluginName + ', ' + methodName + ')');
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
@@ -14,6 +14,9 @@ const promisifyCordova = (pluginObj, pluginName, methodName) => {
|
|||||||
|
|
||||||
if(!pluginObj.installed()) {
|
if(!pluginObj.installed()) {
|
||||||
console.warn('Cordova: tried calling', '"' + pluginName + '.' + methodName + '"', 'but the ' + pluginObj.plugin + ' plugin is not installed.');
|
console.warn('Cordova: tried calling', '"' + pluginName + '.' + methodName + '"', 'but the ' + pluginObj.plugin + ' plugin is not installed.');
|
||||||
|
reject({
|
||||||
|
error: 'plugin_not_installed'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('Cordova: exec(' + pluginName + ', ' + methodName +')');
|
console.log('Cordova: exec(' + pluginName + ', ' + methodName +')');
|
||||||
|
|||||||
Reference in New Issue
Block a user