]> source.dussan.org Git - gitea.git/commitdiff
Fix repo graph JS (#31377)
authorwxiaoguang <wxiaoguang@gmail.com>
Fri, 14 Jun 2024 16:21:40 +0000 (00:21 +0800)
committerGitHub <noreply@github.com>
Fri, 14 Jun 2024 16:21:40 +0000 (18:21 +0200)
Fix #31376
Regression of #30395

web_src/js/features/repo-graph.js

index 0086b92021bd864b66dd911c354b42885b1df19b..689b6f13694ef8ce1a4ef9d25d965ac842127e09 100644 (file)
@@ -69,9 +69,9 @@ export function initRepoGraphGit() {
       const html = await response.text();
       const div = document.createElement('div');
       div.innerHTML = html;
-      document.getElementById('pagination').innerHTML = div.getElementById('pagination').innerHTML;
-      document.getElementById('rel-container').innerHTML = div.getElementById('rel-container').innerHTML;
-      document.getElementById('rev-container').innerHTML = div.getElementById('rev-container').innerHTML;
+      document.getElementById('pagination').innerHTML = div.querySelector('#pagination').innerHTML;
+      document.getElementById('rel-container').innerHTML = div.querySelector('#rel-container').innerHTML;
+      document.getElementById('rev-container').innerHTML = div.querySelector('#rev-container').innerHTML;
       hideElem('#loading-indicator');
       showElem('#rel-container');
       showElem('#rev-container');