Skip to content

Commit 5ce68bb

Browse files
authored
fix(cli): Fix cordova plugin config checker over checking on 4.x (#6443)
1 parent 6f8d1ad commit 5ce68bb

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

cli/src/cordova.ts

+19-12
Original file line numberDiff line numberDiff line change
@@ -954,19 +954,26 @@ export async function writeCordovaAndroidManifest(
954954
}
955955
}
956956
} else {
957-
let foundRequiredElement = false;
958-
for (const existingElementItem of existingElement.children) {
959-
const foundRequiredElementIn = doesElementMatch(
960-
requiredElement,
961-
existingElementItem,
962-
);
963-
if (foundRequiredElementIn) {
964-
foundRequiredElement = true;
965-
break;
957+
if (
958+
requiredElement.children === undefined &&
959+
existingElement.children === undefined
960+
) {
961+
return true;
962+
} else {
963+
let foundRequiredElement = false;
964+
for (const existingElementItem of existingElement.children) {
965+
const foundRequiredElementIn = doesElementMatch(
966+
requiredElement,
967+
existingElementItem,
968+
);
969+
if (foundRequiredElementIn) {
970+
foundRequiredElement = true;
971+
break;
972+
}
973+
}
974+
if (!foundRequiredElement) {
975+
return false;
966976
}
967-
}
968-
if (!foundRequiredElement) {
969-
return false;
970977
}
971978
}
972979
}

0 commit comments

Comments
 (0)