Skip to content

Commit

Permalink
fix(text api): add versionStatus and heVersionStatus to the response.
Browse files Browse the repository at this point in the history
  • Loading branch information
YishaiGlasner committed Oct 28, 2024
1 parent 979a6e3 commit 46f6699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/js/sefaria/sefaria.js
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ Sefaria = extend(Sefaria, {
*/
const versions = versionsResponse.versions;
const [primary, translation] = Sefaria.getPrimaryAndTranslationFromVersions(versions);
({ text: versionsResponse.text, versionTitle: versionsResponse.versionTitle, direction: versionsResponse.translationDirection, languageFamilyName: versionsResponse.translationLang } = translation);
({ text: versionsResponse.he, versionTitle: versionsResponse.heVersionTitle, direction: versionsResponse.primaryDirection, languageFamilyName: versionsResponse.primaryLang } = primary);
({ text: versionsResponse.text, versionTitle: versionsResponse.versionTitle, direction: versionsResponse.translationDirection, languageFamilyName: versionsResponse.translationLang, status: versionsResponse.versionStatus } = translation);
({ text: versionsResponse.he, versionTitle: versionsResponse.heVersionTitle, direction: versionsResponse.primaryDirection, languageFamilyName: versionsResponse.primaryLang, status: versionsResponse.heVersionStatus } = primary);
if (translation.sources && !translation.sources.every(source => source === translation.sources[0])) {
versionsResponse.sources = translation.sources;
}
Expand Down

0 comments on commit 46f6699

Please sign in to comment.