Skip to content

Commit

Permalink
Make sure we're only adding to the top-level group
Browse files Browse the repository at this point in the history
Motivation: other groups may have an undefined "name" property other than the top level

Fix #226
  • Loading branch information
rgomezp committed May 8, 2024
1 parent d7d3091 commit eefcb20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion onesignal/withOneSignalIos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const withOneSignalXcodeProject: ConfigPlugin<OneSignalPluginProps> = (config, p
// files / folder appear in the file explorer in Xcode.
const groups = xcodeProject.hash.project.objects["PBXGroup"];
Object.keys(groups).forEach(function(key) {
if (groups[key].name === undefined) {
if (typeof groups[key] === "object" && groups[key].name === undefined && groups[key].path === undefined) {
xcodeProject.addToPbxGroup(extGroup.uuid, key);
}
});
Expand Down

0 comments on commit eefcb20

Please sign in to comment.