Skip to content
Browse files
fix(ConfigChanges): do not pass PlistValue to xml_helpers.resolvePare…
…nt (#158)

Fixes #156
  • Loading branch information
raphinesse committed Jun 8, 2021
1 parent 614f867 commit 3c9b9ffb93e9ecdbf495a782bb2e5806d060b410
Showing 1 changed file with 9 additions and 4 deletions.
@@ -311,13 +311,18 @@ class PlatformMunger {

// Check if the edit target will resolve to an existing target
if (!target || target.length === 0) {
const file_xml = this.config_keeper.get(this.project_dir, this.platform, editchange.file).data;
const resolveEditTarget = xml_helpers.resolveParent(file_xml,;
let resolveTarget;
const targetFile = this.config_keeper.get(this.project_dir, this.platform, editchange.file);

// For non-XML files (e.g. plist), the selector in uniquely identifies its target.
// Thus we already know that we have no conflict if we are not dealing with an XML file here.
if (targetFile.type !== 'xml') return;

// For XML files, the selector does NOT uniquely identify its target. So we resolve
// and any existing selectors to their matched elements and compare those for equality.
const resolveEditTarget = xml_helpers.resolveParent(,;
if (resolveEditTarget) {
for (const parent in parents) {
resolveTarget = xml_helpers.resolveParent(file_xml, parent);
const resolveTarget = xml_helpers.resolveParent(, parent);
if (resolveEditTarget === resolveTarget) {
conflictingParent = parent;
target = parents[parent];

0 comments on commit 3c9b9ff

Please sign in to comment.