mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 09:57:07 +02:00
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: silverwind <me@silverwind.io>
This commit is contained in:
1 parent
faa7680555
commit
d00a6083fc
1 file changed
+2
-2
@@ -373,11 +373,11 @@ function initDiffExpandAllLines() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Handle individual expand button clicks
|
// Handle individual expand button clicks
|
||||||
addDelegatedEventListener(document, 'click', '.code-expander-button', (btn, e) => {
|
addDelegatedEventListener(document, 'click', '.code-expander-button', async (btn, e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const tr = btn.closest('tr');
|
const tr = btn.closest('tr');
|
||||||
const url = btn.getAttribute('data-url');
|
const url = btn.getAttribute('data-url');
|
||||||
if (tr && url) fetchBlobExcerpt(tr, url);
|
if (tr && url) await fetchBlobExcerpt(tr, url);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user