You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/08/09 23:27:40 UTC
[08/19] cordova-lib git commit: CB-11645 added check to see if
getEditConfig exists before trying to use it
CB-11645 added check to see if getEditConfig exists before trying to use it
Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/185a2424
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/185a2424
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/185a2424
Branch: refs/heads/common-1.4.x
Commit: 185a2424eb31a088c8cbc06e3231893e0a85a3e7
Parents: 3ad0b50
Author: Steve Gill <st...@gmail.com>
Authored: Fri Jul 29 17:16:02 2016 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Mon Aug 1 17:14:54 2016 -0700
----------------------------------------------------------------------
cordova-common/src/ConfigChanges/ConfigChanges.js | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/185a2424/cordova-common/src/ConfigChanges/ConfigChanges.js
----------------------------------------------------------------------
diff --git a/cordova-common/src/ConfigChanges/ConfigChanges.js b/cordova-common/src/ConfigChanges/ConfigChanges.js
index a395c6d..e5b09a7 100644
--- a/cordova-common/src/ConfigChanges/ConfigChanges.js
+++ b/cordova-common/src/ConfigChanges/ConfigChanges.js
@@ -97,7 +97,10 @@ function remove_plugin_changes(pluginInfo, is_top_level) {
var plugin_vars = is_top_level ?
platform_config.installed_plugins[pluginInfo.id] :
platform_config.dependent_plugins[pluginInfo.id];
- var edit_config_changes = pluginInfo.getEditConfigs(self.platform);
+ var edit_config_changes = null;
+ if(pluginInfo.getEditConfigs) {
+ edit_config_changes = pluginInfo.getEditConfigs(self.platform);
+ }
// get config munge, aka how did this plugin change various config files
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
@@ -131,7 +134,12 @@ PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) {
var self = this;
var platform_config = self.platformJson.root;
- var edit_config_changes = pluginInfo.getEditConfigs(self.platform);
+
+ var edit_config_changes = null;
+ if(pluginInfo.getEditConfigs) {
+ edit_config_changes = pluginInfo.getEditConfigs(self.platform);
+ }
+
var config_munge;
if (!edit_config_changes || edit_config_changes.length === 0) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org