diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2021-10-27 19:11:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 19:11:56 +0800 |
commit | 89beceeb9ace8b61223d55b389541bba19578b42 (patch) | |
tree | 98c71641851647d9b1a0b65baf440f3ae32c55e0 /web_src/js | |
parent | a462fcaac8825e992c99e3298a28c649682c0c92 (diff) | |
download | gitea-89beceeb9ace8b61223d55b389541bba19578b42.tar.gz gitea-89beceeb9ace8b61223d55b389541bba19578b42.zip |
Fix a UI error when folding a file content in a commit view (#17446)
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/features/repo-code.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/web_src/js/features/repo-code.js b/web_src/js/features/repo-code.js index 74b3c1fba8..8a361a750d 100644 --- a/web_src/js/features/repo-code.js +++ b/web_src/js/features/repo-code.js @@ -131,9 +131,8 @@ export function initRepoCodeView() { } $(document).on('click', '.fold-file', ({currentTarget}) => { const box = currentTarget.closest('.file-content'); - const chevron = currentTarget.querySelector('a.chevron'); const folded = box.dataset.folded !== 'true'; - chevron.innerHTML = svg(`octicon-chevron-${folded ? 'right' : 'down'}`, 18); + currentTarget.innerHTML = svg(`octicon-chevron-${folded ? 'right' : 'down'}`, 18); box.dataset.folded = String(folded); }); $(document).on('click', '.blob-excerpt', async ({currentTarget}) => { |