Skip to content

Commit 5cc1c91

Browse files
committed
Fix a JS error in initRepoCommitLastCommitLoader's entryMap
1 parent a036507 commit 5cc1c91

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

web_src/js/features/repo-commit.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ export function initRepoCommitLastCommitLoader() {
4545
$('table#repo-files-table .commit-list').replaceWith(row);
4646
return;
4747
}
48-
entryMap[$(row).attr('data-entryname')].replaceWith(row);
48+
// there are other <tr> rows in response (eg: <tr class="has-parent">)
49+
// at the moment only the "data-entryname" rows should be processed
50+
const entryName = $(row).attr('data-entryname');
51+
if (entryName) {
52+
entryMap[entryName].replaceWith(row);
53+
}
4954
});
5055
});
5156
}

0 commit comments

Comments
 (0)