Skip to content

Commit

Permalink
Name is optional in xcodeproj, so compare the path instead (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptxmac authored Oct 24, 2021
1 parent e14b9fa commit e6ebefa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/FigmaExport/Output/XcodeProjectWriter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ final class XcodeProjectWriter {
groups = Array(groups.dropFirst())
}
}

guard currentGroup?.file(named: url.lastPathComponent) == nil else { return }
guard currentGroup?.children.first(where: {$0.path == url.lastPathComponent}) == nil else { return }

let newFile = try currentGroup?.addFile(
at: Path(url.path),
Expand Down

0 comments on commit e6ebefa

Please sign in to comment.