Skip to content

Commit

Permalink
[DOP-3755] Fix potential null access terminal error case (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
casthewiz authored Jun 26, 2023
1 parent d568d82 commit 34953ea
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const shapeToCsCursor = async (
if (repoBranchesEntry) {
const { url, prefix } = prefixFromEnvironment(branches);
const { urlSlug, urlAliases = [], gitBranchName, publishOriginalBranchName } = repoBranchesEntry;
const alias = urlSlug || urlAliases[0] || (publishOriginalBranchName && gitBranchName);
const alias = urlSlug || urlAliases?.[0] || (publishOriginalBranchName && gitBranchName);
tocInsertions[project][branch] = {
original: copyToCTree(metadata.toctree),
urlified: copyToCTree(metadata.toctree, prefix, url, alias),
Expand Down

0 comments on commit 34953ea

Please sign in to comment.