mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-11 07:05:21 +02:00
Use non-null assertions for guaranteed tooltip attributes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
267b7bf236
commit
0fc9c4e6a4
@ -320,7 +320,7 @@ async function expandAllLines(btn: HTMLElement, fileBox: HTMLElement) {
|
|||||||
|
|
||||||
// Update button to "collapse" state
|
// Update button to "collapse" state
|
||||||
btn.innerHTML = svg('octicon-fold', 14);
|
btn.innerHTML = svg('octicon-fold', 14);
|
||||||
const collapseTooltip = btn.getAttribute('data-collapse-tooltip') ?? '';
|
const collapseTooltip = btn.getAttribute('data-collapse-tooltip')!;
|
||||||
btn.setAttribute('data-tooltip-content', collapseTooltip);
|
btn.setAttribute('data-tooltip-content', collapseTooltip);
|
||||||
showTemporaryTooltip(btn, collapseTooltip);
|
showTemporaryTooltip(btn, collapseTooltip);
|
||||||
}
|
}
|
||||||
@ -338,7 +338,7 @@ function collapseExpandedLines(btn: HTMLElement, fileBox: HTMLElement) {
|
|||||||
|
|
||||||
// Update button to "expand" state
|
// Update button to "expand" state
|
||||||
btn.innerHTML = svg('octicon-unfold', 14);
|
btn.innerHTML = svg('octicon-unfold', 14);
|
||||||
const expandTooltip = btn.getAttribute('data-expand-tooltip') ?? '';
|
const expandTooltip = btn.getAttribute('data-expand-tooltip')!;
|
||||||
btn.setAttribute('data-tooltip-content', expandTooltip);
|
btn.setAttribute('data-tooltip-content', expandTooltip);
|
||||||
showTemporaryTooltip(btn, expandTooltip);
|
showTemporaryTooltip(btn, expandTooltip);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user