Skip to content

The Unified and Autonomous Development Platform

Minor optimization of file-list

robin shineb44ae9b6babd
diff --git a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/depotfile/filelist/file-list.js b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/depotfile/filelist/file-list.js
index 36aded9fb9..15913b1924 100644
--- a/gitplex.web/src/main/java/com/pmease/gitplex/web/component/depotfile/filelist/file-list.js
+++ b/gitplex.web/src/main/java/com/pmease/gitplex/web/component/depotfile/filelist/file-list.js
@@ -1,7 +1,6 @@
gitplex.filelist = {
init: function(containerId, lastCommitsUrl) {
var $container = $("#" + containerId);
- var containerEl = $container[0];
var $fileList = $container.find(">.file-list");
$fileList.on("autofit", function(e, width, height) {
@@ -29,7 +28,7 @@ gitplex.filelist = {
xhr.setRequestHeader('Wicket-Ajax-BaseURL', Wicket.Ajax.baseUrl || '.');
},
success: function(lastCommits) {
- if (jQuery.contains(document, containerEl)) { // add this check to avoid rendering last commits if directory is changed
+ if (jQuery.contains(document, $container[0])) { // add this check to avoid rendering last commits if directory is changed
var $table = $container.find(".file-list>table");
$table.find("tr.child").each(function() {
var $row = $(this);