You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a missing test for an undefined value of pluginResult in plugin.js, wrapOthePromise. If the plugin function does not return a result, the code crashes. e.g. is crashing for ScreenOrientation.lockOrientation -- doesn't a result.
function wrapOtherPromise(pluginObj, methodName, args, opts) {
if (opts === void 0) { opts = {}; }
return getPromise(function (resolve, reject) {
var pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts);
if (pluginResult && pluginResult.error) {
reject(pluginResult.error);
}
pluginResult.then(resolve).catch(reject);
});
}
Needs to be:
if (pluginResult) {
pluginResult.then(resolve).catch(reject);
}
The text was updated successfully, but these errors were encountered:
There is a missing test for an undefined value of pluginResult in plugin.js, wrapOthePromise. If the plugin function does not return a result, the code crashes. e.g. is crashing for ScreenOrientation.lockOrientation -- doesn't a result.
function wrapOtherPromise(pluginObj, methodName, args, opts) {
if (opts === void 0) { opts = {}; }
return getPromise(function (resolve, reject) {
var pluginResult = callCordovaPlugin(pluginObj, methodName, args, opts);
if (pluginResult && pluginResult.error) {
reject(pluginResult.error);
}
pluginResult.then(resolve).catch(reject);
});
}
Needs to be:
if (pluginResult) {
pluginResult.then(resolve).catch(reject);
}
The text was updated successfully, but these errors were encountered: