Skip to content

Commit

Permalink
fix: remove duplicated code
Browse files Browse the repository at this point in the history
  • Loading branch information
tisfeng committed Jan 8, 2025
1 parent e150ec2 commit 3866541
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions Easydict/Swift/Service/Youdao/EZQueryResult+Dict.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,8 @@ extension EZQueryResult {
simpleWords.append(simpleWord)
}
}

if !simpleWords.isEmpty {
wordResult.simpleWords = simpleWords
}
}

if !simpleWords.isEmpty {
wordResult.simpleWords = simpleWords
}
wordResult.simpleWords = simpleWords
}

// Handle web translations
Expand Down
9 changes: 1 addition & 8 deletions Easydict/Swift/Service/Youdao/EZQueryResult+DictV4.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,7 @@ extension EZQueryResult {
}
}
}

if !simpleWords.isEmpty {
wordResult.simpleWords = simpleWords
}

if !simpleWords.isEmpty {
wordResult.simpleWords = simpleWords
}
wordResult.simpleWords = simpleWords
}

// Handle web translations
Expand Down

0 comments on commit 3866541

Please sign in to comment.