fix wrong use of return in header file generation loop (#52490)

Summary:
Instead of returning when creating the list of header files from our podspecs, we now call `continue`. This is a bug that causes all subsequent globs in the header file list to be omitted after the first omitted glob.

bypass-github-export-checks

## Changelog:

[IOS] [FIXED] - Fixed premature return in header file generation from podspec globs

Pull Request resolved: https://github.com/facebook/react-native/pull/52490

Test Plan: Run prebuild scripts and verify that React-Fabric podspec headers are included in the resulting xcframework.

Reviewed By: mdvacca

Differential Revision: D78012399

Pulled By: cipolleschi

fbshipit-source-id: 2d334f4f7ff966ea4c778786a7056e13a255a708
This commit is contained in:
Christian Falch
2025-07-14 11:48:00 +01:00
committed by Moti Zilberman
parent 9c4da7b905
commit 75dcb5fc79
+1 -1
View File
@@ -49,7 +49,7 @@ function getHeaderFilesFromPodspecs(
let arg2 = match[2]?.trim().replace(/['"]/g, '');
if (!arg2) {
// Skip
return;
continue;
}
// Check if arg2 is an array (e.g., ['a', 'b'])
if (arg2.startsWith('[') && arg2.endsWith(']')) {