Skip to content

Commit

Permalink
Merge pull request #68 from vkedwardli/fix-gender-specific-translation
Browse files Browse the repository at this point in the history
Fix gender-specific translation error
  • Loading branch information
vitalets committed Mar 3, 2021
2 parents 5f5275e + 8f87a2e commit 140e168
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ function translate(text, opts, gotopts) {
return result;
}

if (json[1][0][0][5] === undefined) {
// translation not found, could be a hyperlink?
if (json[1][0][0][5] === undefined || json[1][0][0][5] === null) {
// translation not found, could be a hyperlink or gender-specific translation?
result.text = json[1][0][0][0];
} else {
json[1][0][0][5].forEach(function (obj) {
Expand Down

0 comments on commit 140e168

Please sign in to comment.