Skip to content

Commit

Permalink
support old cordova-common in which no getPodSpecs function
Browse files Browse the repository at this point in the history
  • Loading branch information
knaito-asial authored and dpogue committed Jan 20, 2019
1 parent 4562ef5 commit 31ef0cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/templates/scripts/cordova/Api.js
Expand Up @@ -267,7 +267,7 @@ Api.prototype.addPlugin = function (plugin, installOptions) {
})
.then(function () {
if (plugin != null) {
var podSpecs = plugin.getPodSpecs(self.platform);
var podSpecs = plugin.getPodSpecs ? plugin.getPodSpecs(self.platform) : [];
var frameworkTags = plugin.getFrameworks(self.platform);
var frameworkPods = frameworkTags.filter(function (obj) {
return (obj.type === 'podspec');
Expand Down Expand Up @@ -321,7 +321,7 @@ Api.prototype.removePlugin = function (plugin, uninstallOptions) {
})
.then(function () {
if (plugin != null) {
var podSpecs = plugin.getPodSpecs(self.platform);
var podSpecs = plugin.getPodSpecs ? plugin.getPodSpecs(self.platform) : [];
var frameworkTags = plugin.getFrameworks(self.platform);
var frameworkPods = frameworkTags.filter(function (obj) {
return (obj.type === 'podspec');
Expand Down

0 comments on commit 31ef0cd

Please sign in to comment.