mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Fix a JS error in initRepoCommitLastCommitLoader's entryMap (#19996)
This commit is contained in:
		@@ -45,7 +45,12 @@ export function initRepoCommitLastCommitLoader() {
 | 
				
			|||||||
        $('table#repo-files-table .commit-list').replaceWith(row);
 | 
					        $('table#repo-files-table .commit-list').replaceWith(row);
 | 
				
			||||||
        return;
 | 
					        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);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user