Skip to content

Commit bad37c9

Browse files
committed
Revert "Fixed some logic in PBXVariantGroup."
This reverts commit ea402c8.
1 parent ea402c8 commit bad37c9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Sources/XcodeGenKit/PBXVariantGroupGenerator.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,10 @@ class PBXVariantGroupGenerator: TargetSourceFilterable {
113113
let pbxVariantGroupInfo = variantGroupInfoList
114114
.filter { $0.targetName == targetName }
115115
.first {
116-
let existsAlwaysStoredBaseFile: Bool = {
117-
var containExtensionList: [Bool] = []
118-
alwaysStoredBaseExtensions.forEach { alwaysStoredBaseExtension in
119-
containExtensionList.append(localizedChildPath.lastComponent.contains(alwaysStoredBaseExtension))
120-
}
121-
return containExtensionList.filter { $0 }.count > 0
122-
}()
116+
let existsAlwaysStoredBaseFile = alwaysStoredBaseExtensions
117+
.reduce(into: [Bool]()) { $0.append(localizedChildPath.lastComponent.contains($1)) }
118+
.filter { $0 }
119+
.count > 0
123120

124121
if existsAlwaysStoredBaseFile {
125122
return $0.path.lastComponentWithoutExtension == localizedChildPath.lastComponentWithoutExtension

0 commit comments

Comments
 (0)