Skip to content

Commit

Permalink
Merge pull request #2216 from Sefaria/edit-withno-versionTitle
Browse files Browse the repository at this point in the history
fix(edit text): add default undefined value for deconstructing versio…
  • Loading branch information
akiva10b authored Jan 7, 2025
2 parents f1e9e62 + 26df3e6 commit e84f7cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/js/ConnectionsPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ const AdvancedToolsList = ({srefs, canEditText, currVersions, setConnectionsMode
const language = (masterPanelLanguage === 'english') ? translationLang : primaryLang;
const langCode = language.slice(0, 2);
const currVersionsLangCode = masterPanelLanguage.slice(0, 2);
const {versionTitle} = currVersions[currVersionsLangCode];
const versionTitle = currVersions[currVersionsLangCode]?.versionTitle;
if (versionTitle) {
refString += "/" + encodeURIComponent(langCode) + "/" + encodeURIComponent(versionTitle);
}
Expand Down

0 comments on commit e84f7cd

Please sign in to comment.