mirror of
https://github.com/go-gitea/gitea.git
synced 2026-02-21 15:48:59 +01:00
Add error toast to auto-load comment expansion path
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5e936bd3c5
commit
db03128bf9
@ -258,7 +258,12 @@ async function onLocationHashChange() {
|
||||
const attrAutoLoadClicked = 'data-auto-load-clicked';
|
||||
if (expandButton.hasAttribute(attrAutoLoadClicked)) return;
|
||||
expandButton.setAttribute(attrAutoLoadClicked, 'true');
|
||||
await fetchBlobExcerpt(expandButton.closest('tr')!, expandButton.getAttribute('data-url')!);
|
||||
try {
|
||||
await fetchBlobExcerpt(expandButton.closest('tr')!, expandButton.getAttribute('data-url')!);
|
||||
} catch (err) {
|
||||
showErrorToast(`Failed to expand: ${err.message}`);
|
||||
return;
|
||||
}
|
||||
continue; // Try again to find the element
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user