Skip to content

Commit

Permalink
change(ios): cleaner set-based fonts-to-find maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Horton committed Aug 16, 2024
1 parent 72da3d8 commit e28d8a3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ public class FontManager {
let familyFonts = UIFont.fontNames(forFamilyName: familyName)

for font in familyFonts {
if let index = fontsToFind.firstIndex(where: { $0 == font }) {
fontsToFind.remove(at: index)
if fontsToFind.contains(font) {
fontsToFind.remove(font)
}

if fontsToFind.count == 0 {
Expand Down

0 comments on commit e28d8a3

Please sign in to comment.