Skip to content

Commit

Permalink
Fix a JS error in initRepoCommitLastCommitLoader's entryMap (#19996)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang authored Jun 17, 2022
1 parent a036507 commit 719eb4a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web_src/js/features/repo-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ export function initRepoCommitLastCommitLoader() {
$('table#repo-files-table .commit-list').replaceWith(row);
return;
}
entryMap[$(row).attr('data-entryname')].replaceWith(row);
// there are other <tr> rows in response (eg: <tr class="has-parent">)
// at the moment only the "data-entryname" rows should be processed
const entryName = $(row).attr('data-entryname');
if (entryName) {
entryMap[entryName].replaceWith(row);
}
});
});
}
Expand Down

0 comments on commit 719eb4a

Please sign in to comment.